pub trait KeyResolver {
// Required method
fn resolve<'a>(
&'a self,
xml: &str,
) -> Result<Option<Box<dyn VerifyingKey + 'a>>, SignatureVerificationPipelineError>;
}Expand description
Key resolver hook used by VerifyContext when no pre-set key is provided.
This trait intentionally has no Send + Sync supertraits; callers that need
cross-thread sharing can wrap resolvers/keys in their own thread-safe types.
Required Methods§
Sourcefn resolve<'a>(
&'a self,
xml: &str,
) -> Result<Option<Box<dyn VerifyingKey + 'a>>, SignatureVerificationPipelineError>
fn resolve<'a>( &'a self, xml: &str, ) -> Result<Option<Box<dyn VerifyingKey + 'a>>, SignatureVerificationPipelineError>
Resolve a verification key for the provided XML document.
Return Ok(None) when no suitable key could be resolved from available
key material (for example, missing <KeyInfo> candidates). VerifyContext
maps Ok(None) to DsigStatus::Invalid(FailureReason::KeyNotFound);
reserve Err(...) for resolver failures.