I have a self-signed root CA using openssl as the following
openssl genrsa -out ca.key 2048
openssl req -new -x509 -days 3650 -key ca.key -out ca.crt
I am trying to load the certificate using rust as the following
///self.ca_key and self.ca_crt are the content of the pem file
let key = KeyPair::from_pem(self.ca_key.as_str())?;
let mut params = CertificateParams::from_ca_cert_pem(self.ca_crt.as_str(), key)?;
When this code was executed, CouldNotParseKeyPair error was thrown. How can I fix this?
I have a self-signed root CA using openssl as the following
I am trying to load the certificate using rust as the following
When this code was executed, CouldNotParseKeyPair error was thrown. How can I fix this?