pub struct DefaultKeyResolver { /* private fields */ }Expand description
Configuration-driven resolver for embedded certificates, DER keys, and key names.
Implementations§
Source§impl DefaultKeyResolver
impl DefaultKeyResolver
Sourcepub fn resolve_with_candidate_budget(
&self,
key_info: Option<&KeyInfo>,
algorithm: SignatureAlgorithm,
policy: &VerificationPolicy,
provider: &dyn CryptoProvider,
candidate_budget: &mut InspectedKeyCandidateBudget<'_>,
) -> Result<Option<ResolvedVerificationKey<'static>>, DsigError>
pub fn resolve_with_candidate_budget( &self, key_info: Option<&KeyInfo>, algorithm: SignatureAlgorithm, policy: &VerificationPolicy, provider: &dyn CryptoProvider, candidate_budget: &mut InspectedKeyCandidateBudget<'_>, ) -> Result<Option<ResolvedVerificationKey<'static>>, DsigError>
Resolve another candidate without resetting aggregate inspection work. The caller must keep the same budget throughout an operation, including failed attempts; policy denials must not be treated as candidate misses.
Sourcepub fn new(config: KeyResolverConfig) -> Self
pub fn new(config: KeyResolverConfig) -> Self
Construct a resolver from explicit caller-owned key and certificate stores.
Sourcepub fn config(&self) -> &KeyResolverConfig
pub fn config(&self) -> &KeyResolverConfig
Borrow the active resolver configuration.
Trait Implementations§
Source§impl Clone for DefaultKeyResolver
impl Clone for DefaultKeyResolver
Source§impl Debug for DefaultKeyResolver
impl Debug for DefaultKeyResolver
Source§impl Default for DefaultKeyResolver
impl Default for DefaultKeyResolver
Source§impl KeyResolver for DefaultKeyResolver
impl KeyResolver for DefaultKeyResolver
Source§fn resolve_for_verification_with_budget<'a>(
&'a self,
key_info: Option<&KeyInfo>,
algorithm: SignatureAlgorithm,
policy: &VerificationPolicy,
provider: &dyn CryptoProvider,
budget: &mut InspectedKeyCandidateBudget<'_>,
) -> Result<Option<ResolvedVerificationKey<'a>>, DsigError>
fn resolve_for_verification_with_budget<'a>( &'a self, key_info: Option<&KeyInfo>, algorithm: SignatureAlgorithm, policy: &VerificationPolicy, provider: &dyn CryptoProvider, budget: &mut InspectedKeyCandidateBudget<'_>, ) -> Result<Option<ResolvedVerificationKey<'a>>, DsigError>
Resolve using the core operation’s cumulative candidate and certificate account.
The default charges one custom-resolver dispatch. Implementations searching
multiple candidates override this method, charging each inspection through
budget and using its execution account for certificate mechanism work.Source§fn resolve_for_verification<'a>(
&'a self,
key_info: Option<&KeyInfo>,
algorithm: SignatureAlgorithm,
policy: &VerificationPolicy,
provider: &dyn CryptoProvider,
) -> Result<Option<ResolvedVerificationKey<'a>>, DsigError>
fn resolve_for_verification<'a>( &'a self, key_info: Option<&KeyInfo>, algorithm: SignatureAlgorithm, policy: &VerificationPolicy, provider: &dyn CryptoProvider, ) -> Result<Option<ResolvedVerificationKey<'a>>, DsigError>
Discover and explicitly authorize a key for an end-to-end operation.
The default preserves discovery only: applications that authorize keys
themselves return
ResolvedVerificationKey::CallerTrusted explicitly.Source§fn resolve<'a>(
&'a self,
key_info: Option<&KeyInfo>,
algorithm: SignatureAlgorithm,
) -> Result<Option<Box<dyn VerifyingKey + 'a>>, DsigError>
fn resolve<'a>( &'a self, key_info: Option<&KeyInfo>, algorithm: SignatureAlgorithm, ) -> Result<Option<Box<dyn VerifyingKey + 'a>>, DsigError>
Resolve a verification key from parsed
<KeyInfo> sources. Read moreSource§fn resolve_with_policy<'a>(
&'a self,
key_info: Option<&KeyInfo>,
algorithm: SignatureAlgorithm,
policy: &VerificationPolicy,
) -> Result<Option<Box<dyn VerifyingKey + 'a>>, DsigError>
fn resolve_with_policy<'a>( &'a self, key_info: Option<&KeyInfo>, algorithm: SignatureAlgorithm, policy: &VerificationPolicy, ) -> Result<Option<Box<dyn VerifyingKey + 'a>>, DsigError>
Resolve under the operation’s immutable policy snapshot. Read more
Source§fn resolve_with_policy_and_provider<'a>(
&'a self,
key_info: Option<&KeyInfo>,
algorithm: SignatureAlgorithm,
policy: &VerificationPolicy,
provider: &dyn CryptoProvider,
) -> Result<Option<Box<dyn VerifyingKey + 'a>>, DsigError>
fn resolve_with_policy_and_provider<'a>( &'a self, key_info: Option<&KeyInfo>, algorithm: SignatureAlgorithm, policy: &VerificationPolicy, provider: &dyn CryptoProvider, ) -> Result<Option<Box<dyn VerifyingKey + 'a>>, DsigError>
Resolve under both the operation policy and cryptographic provider. Read more
Source§fn consumes_document_key_info(&self) -> bool
fn consumes_document_key_info(&self) -> bool
Auto Trait Implementations§
impl Freeze for DefaultKeyResolver
impl RefUnwindSafe for DefaultKeyResolver
impl Send for DefaultKeyResolver
impl Sync for DefaultKeyResolver
impl Unpin for DefaultKeyResolver
impl UnsafeUnpin for DefaultKeyResolver
impl UnwindSafe for DefaultKeyResolver
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more