MCPcopy Create free account
hub / github.com/actix/examples / load_encrypted_private_key

Function load_encrypted_private_key

https-tls/openssl/src/main.rs:56–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54}
55
56fn load_encrypted_private_key() -> PKey<Private> {
57 let mut file = File::open("key.pem").unwrap();
58 let mut buffer = Vec::new();
59 file.read_to_end(&mut buffer).expect("Failed to read file");
60
61 PKey::private_key_from_pem_passphrase(&buffer, b"password").unwrap()
62}

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected