Skip to main content

VerifyOptions

Struct VerifyOptions 

Source
pub struct VerifyOptions {
Show 22 fields pub trust_pem: Option<String>, pub tsa_trust_pem: Option<String>, pub allowed_list_pem: Option<String>, pub cawg_trust_pem: Option<String>, pub cawg_allowed_certs_pem: Option<String>, pub trust_anchor_not_before: Option<String>, pub trust_anchor_not_after: Option<String>, pub no_default_trust: bool, pub cawg_did_documents: Option<HashMap<String, Value>>, pub cawg_ica_trusted_issuers: Option<Vec<String>>, pub cawg_ica_trust_anchors: Option<Vec<String>>, pub cawg_ica_status_lists: Option<HashMap<String, String>>, pub ocsp_responses: Option<HashMap<String, String>>, pub ocsp_unreachable: Option<Vec<String>>, pub external_data: Option<HashMap<String, String>>, pub expected_seek_positions: Vec<usize>, pub strict_conformance: bool, pub cawg_strict_encoding: bool, pub validation_time: Option<String>, pub telemetry: TelemetryOptions, pub online: Option<bool>, pub online_allow_private_networks: bool,
}

Fields§

§trust_pem: Option<String>

PEM bundle of claim-signing trust anchors.

§tsa_trust_pem: Option<String>

PEM bundle of timestamp-authority trust anchors.

§allowed_list_pem: Option<String>

PEM bundle of directly allowed end-entity certificates.

§cawg_trust_pem: Option<String>

PEM bundle of trust anchors for CAWG named-actor (identity) X.509 credentials. None leaves identity signers untrusted (their well-formedness is still validated).

§cawg_allowed_certs_pem: Option<String>

PEM bundle of directly allowed CAWG end-entity certificates.

§trust_anchor_not_before: Option<String>

RFC 3339 start of trust for every caller-supplied trust anchor. Before this instant the caller’s anchors do not validate a signature, whatever the anchor certificate’s own notBefore says. Bundled snapshots are unaffected.

§trust_anchor_not_after: Option<String>

RFC 3339 end of trust for every caller-supplied trust anchor. After this instant the caller’s anchors no longer validate a signature. Bundled snapshots are unaffected.

§no_default_trust: bool

Disable the bundled C2PA, IPTC, and Encypher trust snapshots. By default, caller-supplied PEM bundles extend those snapshots; setting this to true evaluates only caller-supplied trust material.

§cawg_did_documents: Option<HashMap<String, Value>>

Pinned offline DID-document store for CAWG ICA issuers, keyed by primary DID (no fragment). Resolution never touches the network.

§cawg_ica_trusted_issuers: Option<Vec<String>>

ICA issuer DIDs trusted directly by the caller.

§cawg_ica_trust_anchors: Option<Vec<String>>

Trusted DID controller anchors. Issuers may trace to these anchors through controller links in caller-pinned DID documents.

§cawg_ica_status_lists: Option<HashMap<String, String>>

Offline, decompressed revocation bitstrings keyed by credentialStatus.statusListCredential URI and encoded as standard base64. Missing lists fail closed without network access.

§ocsp_responses: Option<HashMap<String, String>>

OCSP responses a caller obtained online, keyed by the lowercase hex SHA-256 of the certificate’s DER and encoded as standard base64 of the DER OCSPResponse.

The SDK never fetches these for you at this layer: supply them from your own OCSP client, or let the SDK’s consent-gated fetcher do it. A response is trusted no further than any other input - it must still be signed by an authorized responder for the certificate in question, and it is evaluated under the C2PA 2.4 and CAWG 1.3 online rules.

§ocsp_unreachable: Option<Vec<String>>

Certificates whose OCSP responder was queried without a usable answer, by the same lowercase hex SHA-256 key.

Each entry registers the signingCredential.ocsp.inaccessible (or cawg.x509.ocsp.inaccessible) informational code in place of the ocsp.skipped code a purely offline run reports.

§external_data: Option<HashMap<String, String>>

Content of cloud-data and hashed external-reference assertions, keyed by the URI the assertion declares and encoded as standard base64.

The bytes are hashed against the assertion’s own alg/hash pair before anything else is done with them.

§expected_seek_positions: Vec<usize>

Zero-based indexes into supplied fragments or stream segments where the player expects a discontinuity. Values must be unique, strictly increasing, and in bounds. Ignored by single-asset verification.

§strict_conformance: bool

Apply the C2PA 2.4 Conformance Program posture instead of the default generous core-spec read. This raises applicable SHOULD requirements to the conformance bar and emits strict diagnostics in the reader report. It also requires CAWG Identity 1.3 deterministic signer_payload CBOR; the default accepts the CAWG 1.1 field order with com.encypher.cawg.legacyProfile.

§cawg_strict_encoding: bool

Refuse the CAWG field-order signer_payload encoding that c2pa-rs writes, without applying the rest of the conformance posture. When unset, the default accepts it with the informational com.encypher.cawg.legacyProfile; strict_conformance refuses it either way.

§validation_time: Option<String>

RFC 3339 validation instant. Current UTC time is used when omitted.

§telemetry: TelemetryOptions

Failure telemetry override. None uses the saved per-user preference.

§online: Option<bool>

Allow this verification to fetch what the asset references: a manifest store held elsewhere, certificate revocation status, a did:web document, externally stored assertion content. None reads the ENCYPHER_C2PA_ONLINE environment variable and otherwise stays offline.

A library call never consults the saved per-user choice and never prompts: the caller decides here, or the operator decides through the environment. Whatever is fetched is used as evidence only. The verdict is still reached by the same offline kernel.

§online_allow_private_networks: bool

Intranet mode: let online checks contact loopback, private, and link-local addresses, and accept plaintext http for every purpose rather than for OCSP alone.

Off by default: a file that names an internal host would otherwise turn this verifier into a probe of the network it runs on. Turn it on for a deployment whose manifest repository or OCSP responder lives on a private address, and for tests that serve from 127.0.0.1. Setting it declares that this machine’s own network is trusted; do not set it on a host that verifies files sent in by strangers.

Trait Implementations§

Source§

impl Clone for VerifyOptions

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VerifyOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for VerifyOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for VerifyOptions

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V