ExIcaoVds.TrustResolver behaviour (ex_icao_vds v0.3.2)

Copy Markdown

Behaviour for resolving signer trust material from a VDS header.

The resolved material is passed to SignatureVerifier.verify/4 and is either {:public_key, ec_point_binary, curve} or {:certificate, cert_der, chain_certs} depending on the trust mode.

Summary

Callbacks

Resolve trust material for the signer identified in header. Returns {:ok, trust_material} or {:error, Error.t()}.

Return revocation material (CRLs, status lists) if available.

Return the trust mode this resolver operates in.

Return the raw trust material (keys / certs) for inspection.

Callbacks

resolve(header, opts)

@callback resolve(header :: ExIcaoVds.Header.t(), opts :: keyword()) ::
  {:ok, term()} | {:error, ExIcaoVds.Error.t()}

Resolve trust material for the signer identified in header. Returns {:ok, trust_material} or {:error, Error.t()}.

revocation_material(opts)

@callback revocation_material(opts :: keyword()) :: term()

Return revocation material (CRLs, status lists) if available.

trust_mode(opts)

@callback trust_mode(opts :: keyword()) :: ExIcaoVds.Header.trust_mode()

Return the trust mode this resolver operates in.

trusted_material(opts)

@callback trusted_material(opts :: keyword()) :: term()

Return the raw trust material (keys / certs) for inspection.