/// New builder from given server key.
///
/// Note if this implementation does not support PKCS #12 keys directly,
/// `openssl` command is used to convert the certificate.
New builder from given server key.
Note if this implementation does not support PKCS #12 keys directly,
`openssl` command is used to convert the certificate.
New builder from given server key . Note if this implementation does not support PKCS #12 keys directly ` openssl ` command is used to convert the certificate .
fn builder_from_pkcs12(pkcs12: &[u8], passphrase: &str) -> anyhow::Result<Self::Builder> {
        let _ = (pkcs12, passphrase);
        assert!(!Self::SUPPORTS_PKCS12_KEYS);
        if !Self::SUPPORTS_DER_KEYS {
            Err(crate::CommonError::TlsBuilderFromFromDerOrPkcs12NotSupported(Self::TYPE_DYN))?;
        }
        let (cert, key) = pkcs12_to_der(pkcs12, passphrase)?;
        Self::builder_from_der_key(&cert, &key)
    }
fn builder_from_pkcs12 ( pkcs12 : & [ u8 ] , passphrase : & str ) -> anyhow :: Result < Self :: Builder > { let _ = ( pkcs12 , passphrase ) ; assert ! ( Self SUPPORTS_PKCS12_KEYS ) ; if ! Self :: SUPPORTS_DER_KEYS { Err ( crate :: CommonError :: TlsBuilderFromFromDerOrPkcs12NotSupported ( Self :: TYPE_DYN ) ) ? ; } let ( cert , key ) = pkcs12_to_der ( pkcs12 , passphrase ) ? ; Self :: builder_from_der_key ( & cert , & key ) }
New builder from given server key.
New builder from given server key .
pkcs12
&[u8]
passphrase
&str