nqrepn, nqrepi,
nqrepfree — read and free a
capsule check report
libnoqtis, -lnoqtis
#include
<noqtis.h>
size_t
nqrepn(const
nqrep *r);
int
nqrepi(const nqrep *r,
size_t i, const char **check,
int *ok, const char
**detail);
void
nqrepfree(nqrep
*r);
A nqrep, made by nqchk(3) or nqchkt(3), holds one row per check, in the order the checks ran. Its layout is private.
nqrepn()
returns the number of rows, or 0 when r is
NULL.
nqrepi()
gives row i: *check the check's
name, a stable string listed below; *ok 1 when the
check passed, 0 when it failed; *detail a UTF-8 text
for people (a file's path, what differs). Any of the three output pointers
may be NULL. The strings belong to the report and
stay valid until nqrepfree().
nqrepfree()
frees the report and wipes its memory; NULL is
allowed.
seal.readseal.parseseal.canonicalseal.fieldsseal.formatnoqtis-seal-1’seal.algseal.contextnoqtis-capsule-1’seal.keyseal.signaturemanifest.readmanifest.digestkeysignaturetimestampfolderfilemanifest.parsemanifest.canonicalmanifest.fieldsmanifest.formatnoqtis-capsule-1’ or
‘noqtis-capsule-2’manifest.createdmanifest.ordermanifest.merklelineagepartialkeys,
key.timeproof.parse,
proof.canonical,
proof.fields,
proof.entrypathextraunsafeRows after a failure that makes later checks meaningless are left
out (for example, no seal.alg row when
seal.format failed). A report never has zero
rows.
nqrepi() returns
NQOK, or NQEARG when
r is NULL or
i is not below
nqrepn(r).
size_t i;
for (i = 0; i < nqrepn(rep); i++) {
const char *check, *detail;
int ok;
if (nqrepi(rep, i, &check, &ok, &detail) == NQOK)
printf("%-4s %s: %s\n", ok ? "ok" : "FAIL", check, detail);
}
nqrepfree(rep);