pub fn read_key(path: &Path) -> ProtoResult<PrivateKey>
Available on crate feature dns-over-rustls only.
Expand description

Reads a private key from a pkcs8 formatted, and possibly encoded file

Accepted formats

  • A Sec1-encoded plaintext private key; as specified in RFC5915
  • A DER-encoded plaintext RSA private key; as specified in PKCS#1/RFC3447
  • DER-encoded plaintext private key; as specified in PKCS#8/RFC5958