Local CoRIM Verifier (V2)#
Verify a CMW input collection in-process.
Replaces the legacy GPU/NVSwitch local verifiers for CoRIM-compliant devices.
Enumerations#
- nvat_hash_algorithm_t
Hash algorithms for computing ear_nvidia_inputs.digests.
Functions#
- nvat_rc_t nvat_local_corim_verifier_add_backup_rim_locator(nvat_local_corim_verifier_t verifier, const char *uri)
Append a fallback RIM locator URI.
- nvat_rc_t nvat_local_corim_verifier_create(nvat_local_corim_verifier_t *out_verifier, nvat_corim_store_t *corim_store, nvat_ocsp_client_t ocsp_client)
Create a local CoRIM verifier from injected collaborators.
- void nvat_local_corim_verifier_free(nvat_local_corim_verifier_t *verifier)
- nvat_rc_t nvat_local_corim_verifier_set_backup_spdm_coev(nvat_local_corim_verifier_t verifier, const uint8_t *coev_data, size_t coev_len)
Set a fallback ConciseEvidence (#6.571 CBOR blob).
- nvat_rc_t nvat_local_corim_verifier_set_default_hash_algorithms(nvat_local_corim_verifier_t verifier, const nvat_hash_algorithm_t *algs, size_t num_algs)
Set the default hash algorithms for ear_nvidia_inputs.digests.
- nvat_rc_t nvat_local_corim_verifier_set_verify_coev_signature(nvat_local_corim_verifier_t verifier, bool enabled)
Toggle signature verification on a CoEV fetched from the RIM service.
- nvat_rc_t nvat_local_corim_verifier_set_verify_evidence_signature(nvat_local_corim_verifier_t verifier, bool enabled)
Toggle evidence signature verification.
- nvat_rc_t nvat_local_corim_verifier_set_verify_revocation(nvat_local_corim_verifier_t verifier, bool enabled)
Toggle certificate revocation checking via OCSP.
- nvat_rc_t nvat_local_corim_verifier_set_verify_rim_signature(nvat_local_corim_verifier_t verifier, bool enabled)
Toggle CoRIM signature verification.
- nvat_rc_t nvat_local_corim_verifier_verify_cmw(const nvat_local_corim_verifier_t verifier, const uint8_t *cmw_data, size_t cmw_len, nvat_cmw_format_t format, nvat_ear_signing_options_t ear_signing_options, nvat_str_t *out_ear_jwt, nvat_str_t *out_ear_json)
Verify a CMW input collection and emit a signed EAR.
Typedefs#
- nvat_local_corim_verifier_t
Opaque handle to a local CoRIM-based verifier.
Enumerations#
-
enum nvat_hash_algorithm_t#
Hash algorithms for computing ear_nvidia_inputs.digests.
Values are IANA Named Information registry hash algorithm IDs, the same identifiers CoRIM and CoEV digest records use.
Values:
-
enumerator NVAT_HASH_ALGORITHM_SHA256#
-
enumerator NVAT_HASH_ALGORITHM_SHA384#
-
enumerator NVAT_HASH_ALGORITHM_SHA512#
-
enumerator NVAT_HASH_ALGORITHM_SHA256#
Functions#
- nvat_rc_t nvat_local_corim_verifier_add_backup_rim_locator(
- nvat_local_corim_verifier_t verifier,
- const char *uri,
Append a fallback RIM locator URI.
When evidence contains no rim-locator URLs, the backup list is used instead.
- Parameters:
verifier – Handle from nvat_local_corim_verifier_create.
uri – Null-terminated RIM locator URI string.
- nvat_rc_t nvat_local_corim_verifier_create(
- nvat_local_corim_verifier_t *out_verifier,
- nvat_corim_store_t *corim_store,
- nvat_ocsp_client_t ocsp_client,
Create a local CoRIM verifier from injected collaborators.
- Parameters:
out_verifier – On success, receives the verifier handle. Free with nvat_local_corim_verifier_free.
corim_store – Pointer to a RIM fetching collaborator handle (allowlist, rewrites, service key). Required. On success, ownership transfers to the verifier and
*corim_storeis set to NULL.ocsp_client – Revocation collaborator. NULL means no revocation checking.
- void nvat_local_corim_verifier_free(
- nvat_local_corim_verifier_t *verifier,
- nvat_rc_t nvat_local_corim_verifier_set_backup_spdm_coev(
- nvat_local_corim_verifier_t verifier,
- const uint8_t *coev_data,
- size_t coev_len,
Set a fallback ConciseEvidence (#6.571 CBOR blob).
When SPDM evidence yields no ECTs, the backup is parsed and its ECTs are used instead. Bytes are stored as-is; parse errors surface during nvat_local_corim_verifier_verify_cmw.
- Parameters:
verifier – Handle from nvat_local_corim_verifier_create.
coev_data – Raw bytes of a #6.571-tagged ConciseEvidence blob.
coev_len – Length of
coev_datain bytes.
- nvat_rc_t nvat_local_corim_verifier_set_default_hash_algorithms(
- nvat_local_corim_verifier_t verifier,
- const nvat_hash_algorithm_t *algs,
- size_t num_algs,
Set the default hash algorithms for ear_nvidia_inputs.digests.
Used when the request does not ask for specific algorithms; an input carrying ars.digest-algos overrides this. Defaults to {NVAT_HASH_ALGORITHM_SHA256}. Pass num_algs=0 to disable digest output.
- Parameters:
verifier – Handle from nvat_local_corim_verifier_create.
algs – Array of hash algorithm identifiers.
num_algs – Number of elements in
algs.
- nvat_rc_t nvat_local_corim_verifier_set_verify_coev_signature(
- nvat_local_corim_verifier_t verifier,
- bool enabled,
Toggle signature verification on a CoEV fetched from the RIM service.
Covers a concise-evidence blob fetched alongside a RIM, independent of the RIM’s own signature (nvat_local_corim_verifier_set_verify_rim_signature) since CoEV signing can lag CoRIM signing in a given deployment. Verification is enabled by default; disabling it is never appropriate in production.
- nvat_rc_t nvat_local_corim_verifier_set_verify_evidence_signature(
- nvat_local_corim_verifier_t verifier,
- bool enabled,
Toggle evidence signature verification.
Enabled by default. When false the verifier retains unsigned or badly-signed evidence and all claims available from a parseable, untrusted chain, including DTI ECTs and akpub. The result remains unverified and contraindicated. Disable only for development fixtures.
- nvat_rc_t nvat_local_corim_verifier_set_verify_revocation(
- nvat_local_corim_verifier_t verifier,
- bool enabled,
Toggle certificate revocation checking via OCSP.
When
enabledis true (the default), the verifier checks revocation of the device-identity chain and (when RIM signatures are verified) the CoRIM signing chain. The default OCSP client derives each responder URL from the certificate’s Authority Information Access extension. When disabled, chains are treated as not revoked.
- nvat_rc_t nvat_local_corim_verifier_set_verify_rim_signature(
- nvat_local_corim_verifier_t verifier,
- bool enabled,
Toggle CoRIM signature verification.
When
enabledis true (the default) the verifier requires every fetched CoRIM to be a tagged signed-corim whose COSE_Sign1 signature checks out against the CoRIM trust store. When false, the verifier additionally accepts unsigned CoRIMs (tagged unsigned-corim-map) and skips signature validation on signed ones — intended for development against unsigned fixtures, never for production.
- nvat_rc_t nvat_local_corim_verifier_verify_cmw(
- const nvat_local_corim_verifier_t verifier,
- const uint8_t *cmw_data,
- size_t cmw_len,
- nvat_cmw_format_t format,
- nvat_ear_signing_options_t ear_signing_options,
- nvat_str_t *out_ear_jwt,
- nvat_str_t *out_ear_json,
Verify a CMW input collection and emit a signed EAR.
Appraisal findings — cert chain status, OCSP, evidence signature, and the measurement match — are collected per evidence item rather than enforced. The return code reflects only whether the input could be processed; the pass/fail verdict is derived from
out_ear_jwtby the caller.TODO: future signature also takes nvat_evidence_policy_t. RP policy is out of scope here.
- Parameters:
verifier – Handle from nvat_local_corim_verifier_create.
cmw_data – CMW collection bytes.
cmw_len – Length of
cmw_datain bytes.format – Wire format. CBOR returns NVAT_RC_FEATURE_NOT_ENABLED.
ear_signing_options – EAR-signing options (private_key_pem, issuer, kid), from nvat_detached_eat_options_create. NULL, or an options handle with an empty private key, yields an unsigned EAR (alg=none) — for tests only; production callers must supply a key.
out_ear_jwt – On success, set to a newly allocated string holding the EAR (Entity Attestation Result) JWT for this appraisal. Free with nvat_str_free. May be NULL to discard the result.
out_ear_json – On success, set to a newly allocated string holding the same EAR as unsigned JSON (no need to decode
out_ear_jwt). Free with nvat_str_free. May be NULL to discard the result.
Typedefs#
-
typedef struct nvat_local_corim_verifier_st *nvat_local_corim_verifier_t#
Opaque handle to a local CoRIM-based verifier.