pub fn new_from_x509(cert: X509) -> Result<Self, TlsPublicKeyCertCreationError> {
        let der_cached = cert.to_der().map_err(|e| TlsPublicKeyCertCreationError {
            internal_error: format!("Error encoding DER: {}", e),
        })?;

        Ok(Self {
            hash_cached: Self::hash(&cert)?,
            cert,
            der_cached,
        })
    }
/// Creates a certificate from an existing OpenSSL struct
Creates a certificate from an existing OpenSSL struct
Creates a certificate from an existing OpenSSL struct
pub fn new_from_x509(cert: X509) -> Result<Self, TlsPublicKeyCertCreationError> {
        let der_cached = cert.to_der().map_err(|e| TlsPublicKeyCertCreationError {
            internal_error: format!("Error encoding DER: {}", e),
        })?;
        Ok(Self {
            hash_cached: Self::hash(&cert)?,
            cert,
            der_cached,
        })
    }
pub fn new_from_x509 ( cert : X509 ) -> Result < Self , TlsPublicKeyCertCreationError > { let der_cached = cert . to_der ( ) . map_err ( | e | TlsPublicKeyCertCreationError { internal_error : format ! ( " " e ) , } ) ? ; Ok ( Self { hash_cached : Self :: hash ( & cert ) ? , cert , der_cached , } ) }
Creates a certificate from an existing OpenSSL struct
Creates a certificate from an existing OpenSSL struct
cert
X509
cert
X509