/// Creates a certificate from ASN.1 DER encoding
Creates a certificate from ASN.1 DER encoding
Creates a certificate from ASN . 1 DER encoding
pub fn new_from_der(cert_der: Vec<u8>) -> Result<Self, TlsPublicKeyCertCreationError> {
        let cert = X509::from_der(&cert_der).map_err(|e| TlsPublicKeyCertCreationError {
            internal_error: format!("Error parsing DER: {}", e),
        })?;
        Ok(Self {
            hash_cached: Self::hash(&cert)?,
            cert,
            der_cached: cert_der,
        })
    }
pub fn new_from_der ( cert_der : Vec < u8 > ) -> Result < Self , TlsPublicKeyCertCreationError > { let cert = X509 :: from_der ( & cert_der ) . map_err ( | e | TlsPublicKeyCertCreationError { internal_error : format ! ( " " e ) , } ) ? ; Ok ( Self { hash_cached : Self :: hash ( & cert ) ? , cert , der_cached : cert_der , } ) }
Creates a certificate from ASN.1 DER encoding
Creates a certificate from ASN . 1 DER encoding
cert_der
Vec<u8>