pub fn new_from_pem(private_key_pem: Vec<u8>) -> Result<Self, TlsPemParsingError> {
        // nb. Make sure we don't leak sensitive info in the error message.
        let private_key =
            PKey::private_key_from_pem(&private_key_pem).map_err(|_| TlsPemParsingError {
                internal_error: "Error parsing PEM via OpenSSL".to_string(),
            })?;
        Ok(Self { private_key })
    }
/// Creates a private key from a PEM encoding
Creates a private key from a PEM encoding
Creates a private key from a PEM encoding
pub fn new_from_pem(private_key_pem: Vec<u8>) -> Result<Self, TlsPemParsingError> {
        // nb. Make sure we don't leak sensitive info in the error message.
        let private_key =
            PKey::private_key_from_pem(&private_key_pem).map_err(|_| TlsPemParsingError {
                internal_error: "Error parsing PEM via OpenSSL".to_string(),
            })?;
        Ok(Self { private_key })
    }
pub fn new_from_pem ( private_key_pem : Vec < u8 > ) -> Result < Self , TlsPemParsingError > { // nb. Make sure we don't leak sensitive info in the error message. let private_key = PKey :: private_key_from_pem ( & private_key_pem ) . map_err ( | _ | TlsPemParsingError { internal_error : " " . to_string ( ) , } ) ? ; Ok ( Self { private_key } ) }
Creates a private key from a PEM encoding
Creates a private key from a PEM encoding
private_key_pem
Vec<u8>
private_key_pem
Vec<u8>