#[non_exhaustive]pub struct Resolved {
pub profile: Profile,
pub options: Options,
pub tls: Policy,
pub keys: Vec<SignatureAlgorithm>,
pub excluded: Vec<Algorithm>,
}Expand description
A profile resolved against this backend’s module. profile and options say what resolve
was called with; tls goes to tls::client_builder, tls::server_builder and the verifier
builders; Resolved::certified_key binds this side’s certificate and key to the profile.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.profile: ProfileThe profile.
options: OptionsThe options it was narrowed by.
tls: PolicyThe TLS policy.
keys: Vec<SignatureAlgorithm>The key algorithms the profile admits, in preference order.
excluded: Vec<Algorithm>Entries unavailable on the module line after Options, in family and preference order.
Implementations§
Source§impl Resolved
impl Resolved
Sourcepub fn admit_key(&self, a: SignatureAlgorithm) -> Result<(), CryptoError>
pub fn admit_key(&self, a: SignatureAlgorithm) -> Result<(), CryptoError>
Refuses a TLS certificate key algorithm the profile does not admit.
tls::CertificateKey::generate, CertificateKey::from_pkcs8_der and
Resolved::certified_key call it.
Sourcepub fn certified_key(
&self,
chain: Vec<CertificateDer<'static>>,
key: &CertificateKey,
) -> Result<CertifiedKey, CryptoError>
pub fn certified_key( &self, chain: Vec<CertificateDer<'static>>, key: &CertificateKey, ) -> Result<CertifiedKey, CryptoError>
The certificate chain and key for this side of a connection, for
rustls::sign::SingleCertAndKey or a resolver of the caller’s. Refuses a key the profile
does not admit, whichever Resolved made it, and a chain whose end-entity certificate does
not carry the key. The key signs only with a scheme in tls.signature_schemes. When the
peer offers none of them, a server handshake fails; a client sends an empty Certificate,
which fails only if the server requires client authentication.