Struct rustls::ResolvesServerCertUsingSNI
source · [−]pub struct ResolvesServerCertUsingSNI { /* private fields */ }
Expand description
Something that resolves do different cert chains/keys based on client-supplied server name (via SNI).
Implementations
sourceimpl ResolvesServerCertUsingSNI
impl ResolvesServerCertUsingSNI
sourcepub fn new() -> ResolvesServerCertUsingSNI
pub fn new() -> ResolvesServerCertUsingSNI
Create a new and empty (ie, knows no certificates) resolver.
sourcepub fn add(&mut self, name: &str, ck: CertifiedKey) -> Result<(), TLSError>
pub fn add(&mut self, name: &str, ck: CertifiedKey) -> Result<(), TLSError>
Add a new sign::CertifiedKey
to be used for the given SNI name
.
This function fails if name
is not a valid DNS name, or if
it’s not valid for the supplied certificate, or if the certificate
chain is syntactically faulty.
Trait Implementations
sourceimpl ResolvesServerCert for ResolvesServerCertUsingSNI
impl ResolvesServerCert for ResolvesServerCertUsingSNI
sourcefn resolve(
&self,
server_name: Option<DNSNameRef<'_>>,
_sigschemes: &[SignatureScheme]
) -> Option<CertifiedKey>
fn resolve(
&self,
server_name: Option<DNSNameRef<'_>>,
_sigschemes: &[SignatureScheme]
) -> Option<CertifiedKey>
Choose a certificate chain and matching key given any server DNS name provided via SNI, and signature schemes. Read more
Auto Trait Implementations
impl !RefUnwindSafe for ResolvesServerCertUsingSNI
impl Send for ResolvesServerCertUsingSNI
impl Sync for ResolvesServerCertUsingSNI
impl Unpin for ResolvesServerCertUsingSNI
impl !UnwindSafe for ResolvesServerCertUsingSNI
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more