pub fn add(&mut self, index: i32, ck: sign::CertifiedKey) -> Result<()> {
        // let checked_name = webpki::DNSNameRef::try_from_ascii_str(name)
        //     .map_err(|_| TLSError::General("Bad DNS name".into()))?;
        //
        // ck.cross_check_end_entity_cert(Some(checked_name))?;
        self.by_name
            .write()
            .unwrap()
            .as_mut()
            .unwrap()
            .insert(index, 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, index: i32, ck: sign::CertifiedKey) -> Result<()> {
        // let checked_name = webpki::DNSNameRef::try_from_ascii_str(name)
        //     .map_err(|_| TLSError::General("Bad DNS name".into()))?;
        //
        // ck.cross_check_end_entity_cert(Some(checked_name))?;
        self.by_name
            .write()
            .unwrap()
            .as_mut()
            .unwrap()
            .insert(index, Arc::new(ck));
        Ok(())
    }
pub fn add ( & mut self , index : i32 , ck : sign :: CertifiedKey ) -> Result < ( ) > { // let checked_name = webpki::DNSNameRef::try_from_ascii_str(name) //     .map_err(|_| TLSError::General("Bad DNS name".into()))?; // // ck.cross_check_end_entity_cert(Some(checked_name))?; self . by_name . write ( ) . unwrap ( ) . as_mut ( ) . unwrap ( ) . insert ( index , 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
index
i32
ck
sign::CertifiedKey