pub fn from_pkcs8(cert: &[u8], key: &[u8]) -> Self {
        let mut config = ServerConfig::new(NoClientAuth::new());

        config
            .set_single_cert(
                certs(&mut BufReader::new(cert)).unwrap(),
                pkcs8_private_keys(&mut BufReader::new(key))
                    .unwrap()
                    .remove(0),
            )
            .expect("could not create a rustls ServerConfig from the supplied cert and key");

        config.into()
    }
/**
    build a new RustlsAcceptor from a pkcs8 cert and key
    */
build a new RustlsAcceptor from a pkcs8 cert and key
build a new RustlsAcceptor from a pkcs8 cert and key
pub fn from_pkcs8(cert: &[u8], key: &[u8]) -> Self {
        let mut config = ServerConfig::new(NoClientAuth::new());
        config
            .set_single_cert(
                certs(&mut BufReader::new(cert)).unwrap(),
                pkcs8_private_keys(&mut BufReader::new(key))
                    .unwrap()
                    .remove(0),
            )
            .expect("could not create a rustls ServerConfig from the supplied cert and key");
        config.into()
    }
pub fn from_pkcs8 ( cert : & [ u8 ] , key : & [ u8 ] ) -> Self { let mut config = ServerConfig :: new ( NoClientAuth :: new ( ) ) ; config . set_single_cert ( certs ( & mut BufReader :: new ( cert ) ) . unwrap ( ) , pkcs8_private_keys ( & mut BufReader :: new ( key ) ) . unwrap ( ) . remove ( 0 ) , ) . expect ( " " ) ; config . into ( ) }
build a new RustlsAcceptor from a pkcs8 cert and key
build a new RustlsAcceptor from a pkcs8 cert and key
cert
&[u8]
key
&[u8]
cert
&[u8]
key
&[u8]