pub fn add(&mut self, name: &str, ck: sign::CertifiedKey) -> Result<(), Error> {
        let checked_name = webpki::DnsNameRef::try_from_ascii_str(name)
            .map_err(|_| Error::General("Bad DNS name".into()))?;
        ck.cross_check_end_entity_cert(Some(checked_name))?;
        self.by_name
            .insert(name.into(), Arc::new(ck));
        Ok(())
    }
/// 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.
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.
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 .
pub fn add(&mut self, name: &str, ck: sign::CertifiedKey) -> Result<(), Error> {
        let checked_name = webpki::DnsNameRef::try_from_ascii_str(name)
            .map_err(|_| Error::General("Bad DNS name".into()))?;
        ck.cross_check_end_entity_cert(Some(checked_name))?;
        self.by_name
            .insert(name.into(), Arc::new(ck));
        Ok(())
    }
pub fn add ( & mut self , name : & str , ck : sign :: CertifiedKey ) -> Result < ( ) , Error > { let checked_name = webpki :: DnsNameRef :: try_from_ascii_str ( name ) . map_err ( | _ | Error :: General ( " " . into ( ) ) ) ? ; ck . cross_check_end_entity_cert ( Some ( checked_name ) ) ? ; self . by_name . insert ( name . into ( ) , Arc :: new ( ck ) ) ; Ok ( ( ) ) }
Add a new `sign::CertifiedKey` to be used for the given SNI `name`.
Add a new ` sign :: CertifiedKey ` to be used for the given SNI ` name ` .
&mut self
name
&str
ck
sign::CertifiedKey
&mut self
name
&str
ck
sign::CertifiedKey