diff options
| author | Steven Fackler <[email protected]> | 2016-11-13 16:09:52 +0000 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2016-11-13 16:09:52 +0000 |
| commit | 387e78257b578fef5933142085aefa1c76722b49 (patch) | |
| tree | 319cee47bc8e88f7f083ef14937b35a64c637344 /openssl-sys/src | |
| parent | Add private_key_from_pem_passphrase (diff) | |
| download | rust-openssl-387e78257b578fef5933142085aefa1c76722b49.tar.xz rust-openssl-387e78257b578fef5933142085aefa1c76722b49.zip | |
Support serialization of encrypted private keys
Switch to PEM_write_bio_PKCS8PrivateKey since the other function outputs
nonstandard PEM when encrypting.
Diffstat (limited to 'openssl-sys/src')
| -rw-r--r-- | openssl-sys/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/openssl-sys/src/lib.rs b/openssl-sys/src/lib.rs index 1b84b690..63714b7e 100644 --- a/openssl-sys/src/lib.rs +++ b/openssl-sys/src/lib.rs @@ -1496,6 +1496,10 @@ extern { kstr: *mut c_uchar, klen: c_int, callback: Option<PasswordCallback>, user_data: *mut c_void) -> c_int; + pub fn PEM_write_bio_PKCS8PrivateKey(bio: *mut BIO, pkey: *mut EVP_PKEY, cipher: *const EVP_CIPHER, + kstr: *mut c_char, klen: c_int, + callback: Option<PasswordCallback>, + user_data: *mut c_void) -> c_int; pub fn PEM_write_bio_PUBKEY(bp: *mut BIO, x: *mut EVP_PKEY) -> c_int; pub fn PEM_write_bio_RSAPrivateKey(bp: *mut BIO, rsa: *mut RSA, cipher: *const EVP_CIPHER, kstr: *mut c_uchar, klen: c_int, |