Skip to content

nqchkx(3)

nqchkx — check a capsule, partially or with its inputs

libnoqtis, -lnoqtis

#include <noqtis.h>

typedef struct {
  const uint8_t *trust;
  size_t trustlen;
  const uint8_t *const *anc;
  const size_t *anclen;
  size_t nanc;
  const char *const *only;
  size_t nonly;
  const char *const *lin;
  size_t nlin;
  const char *const *stmt;
  const size_t *stmtlen;
  size_t nstmt;
} nqcopt;


int
nqchkx(const char *dir, const nqcopt *o, nqrep **rep);

() is nqchkt(3) with the options in o; any member may be 0 or NULL, and o itself may be NULL. trust, anc, anclen and nanc are as for nqchkt(3).

only[0..nonly] makes the check partial: the seal, the signature and the manifest are checked in full, but only these listed paths are checked as files; the others are neither read nor needed, and files present but not listed are not looked for. ‘partial’ rows say what was left out. A path the manifest does not list fails its ‘file’ row.

lin[0..nlin] are folders of capsules that may be the inputs of a format 2 capsule (nqseal2(3)). Each input is found among them by its id (nqcapid(3)) and checked in full with no key pinned, its own inputs in turn, to 64 levels; one ‘lineage’ row per input says whether it was found and checks, and for one that does not check, its first failing row.

stmt[0..nstmt] are key statements of stmtlen[i] bytes, at most 32, from nqkstmt(3); they need trust (NQEARG otherwise). One ‘keys’ row per statement. The ‘key’ row then also passes for a key the trusted key was rotated to, through the statements, and a ‘key.time’ row requires a verified timestamp from before the seal's key was rotated away or revoked, when it was.

As nqchk(3): NQOK when every check passed, NQEVRFY when one failed (the report says which), NQEARG and NQEMEM with no report.

noqtis-check(1), nqchk(3), nqchkt(3), nqkstmt(3), nqprove(3), nqrep(3), nqseal2(3), noqtis-capsule(5)