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, 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
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more