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§
source§impl 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§
source§impl ResolvesServerCert for ResolvesServerCertUsingSNI
impl ResolvesServerCert for ResolvesServerCertUsingSNI
source§fn resolve(&self, client_hello: ClientHello<'_>) -> Option<CertifiedKey>
fn resolve(&self, client_hello: ClientHello<'_>) -> Option<CertifiedKey>
Choose a certificate chain and matching key given simplified
ClientHello information. 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§
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