diff options
| author | Steven Fackler <[email protected]> | 2017-12-25 22:02:41 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2017-12-25 22:09:27 -0700 |
| commit | 2adf2cf12bf1afb806ec8bfb222d32831137d749 (patch) | |
| tree | 7af6a6aeecd9113d7b22028a13eed5df11fa3127 /openssl/src/pkey.rs | |
| parent | Merge pull request #797 from sfackler/fixmes (diff) | |
| download | rust-openssl-2adf2cf12bf1afb806ec8bfb222d32831137d749.tar.xz rust-openssl-2adf2cf12bf1afb806ec8bfb222d32831137d749.zip | |
Remove deprecated APIs
Diffstat (limited to 'openssl/src/pkey.rs')
| -rw-r--r-- | openssl/src/pkey.rs | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/openssl/src/pkey.rs b/openssl/src/pkey.rs index 5cbc2878..68e4696d 100644 --- a/openssl/src/pkey.rs +++ b/openssl/src/pkey.rs @@ -1,4 +1,4 @@ -use libc::{c_char, c_int, c_void, size_t}; +use libc::{c_int, size_t}; use std::ptr; use std::mem; use std::ffi::CString; @@ -12,7 +12,7 @@ use dsa::Dsa; use ec::EcKey; use rsa::{Padding, Rsa}; use error::ErrorStack; -use util::{invoke_passwd_cb, invoke_passwd_cb_old, CallbackState}; +use util::{invoke_passwd_cb, CallbackState}; foreign_type_and_impl_send_sync! { type CType = ffi::EVP_PKEY; @@ -202,25 +202,6 @@ impl PKey { )).map(PKey) } } - - #[deprecated(since = "0.9.2", note = "use private_key_from_pem_callback")] - pub fn private_key_from_pem_cb<F>(buf: &[u8], pass_cb: F) -> Result<PKey, ErrorStack> - where - F: FnOnce(&mut [c_char]) -> usize, - { - ffi::init(); - let mut cb = CallbackState::new(pass_cb); - let mem_bio = MemBioSlice::new(buf)?; - unsafe { - let evp = cvt_p(ffi::PEM_read_bio_PrivateKey( - mem_bio.as_ptr(), - ptr::null_mut(), - Some(invoke_passwd_cb_old::<F>), - &mut cb as *mut _ as *mut c_void, - ))?; - Ok(PKey::from_ptr(evp)) - } - } } foreign_type_and_impl_send_sync! { |