pub struct KeyInfoParsingSession<'a> { /* private fields */ }Expand description
Shared ingestion accounting for KeyInfo elements in one operation.
Parsing charges embedded candidates and X.509 bytes before materialization; these charges are independent of later resolver inspection work and are not refunded when parsing fails. The immutable operation snapshot is borrowed.
Implementations§
Source§impl<'a> KeyInfoParsingSession<'a>
impl<'a> KeyInfoParsingSession<'a>
Sourcepub fn with_certificate_public_key<R>(
&mut self,
der: &[u8],
inspect: impl FnOnce(&[u8]) -> R,
) -> Result<R, ParseError>
pub fn with_certificate_public_key<R>( &mut self, der: &[u8], inspect: impl FnOnce(&[u8]) -> R, ) -> Result<R, ParseError>
Inspect original certificate SPKI without constructing display metadata or starting another certificate budget. Parsing does not establish trust. The callback owns any further key conversion and its accounting.
Sourcepub fn certificate_matches_selectors(
&mut self,
info: &X509DataInfo,
der: &[u8],
provider: &dyn CryptoProvider,
) -> Result<bool, ParseError>
pub fn certificate_matches_selectors( &mut self, info: &X509DataInfo, der: &[u8], provider: &dyn CryptoProvider, ) -> Result<bool, ParseError>
Match a candidate’s selectors in this operation’s retained account.
Sourcepub fn new(resources: &'a ResourcePolicy) -> Result<Self, ParseError>
pub fn new(resources: &'a ResourcePolicy) -> Result<Self, ParseError>
Start a session using the operation’s resource policy.
Sourcepub fn parse(&mut self, node: Node<'_, '_>) -> Result<KeyInfo, ParseError>
pub fn parse(&mut self, node: Node<'_, '_>) -> Result<KeyInfo, ParseError>
Parse another element without resetting this operation’s allowance.
Sourcepub fn parse_with_provider(
&mut self,
node: Node<'_, '_>,
provider: &dyn CryptoProvider,
) -> Result<KeyInfo, ParseError>
pub fn parse_with_provider( &mut self, node: Node<'_, '_>, provider: &dyn CryptoProvider, ) -> Result<KeyInfo, ParseError>
Parse with the operation’s explicit crypto engine and existing allowance.