aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/crypto/rsa.rs
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2016-06-26 19:44:53 +0200
committerJonas Schievink <[email protected]>2016-06-26 19:44:53 +0200
commitf24ab2693636f16ce71a171a4d4d63bd0f5bbea0 (patch)
treecfdc4e6437337104c8a2e5cb6d39621517597629 /openssl/src/crypto/rsa.rs
parentPut the test behind the catch_unwind feature (diff)
downloadrust-openssl-f24ab2693636f16ce71a171a4d4d63bd0f5bbea0.tar.xz
rust-openssl-f24ab2693636f16ce71a171a4d4d63bd0f5bbea0.zip
FnMut -> FnOnce, update docs
Diffstat (limited to 'openssl/src/crypto/rsa.rs')
-rw-r--r--openssl/src/crypto/rsa.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/openssl/src/crypto/rsa.rs b/openssl/src/crypto/rsa.rs
index 9a04bf7f..3b420fbc 100644
--- a/openssl/src/crypto/rsa.rs
+++ b/openssl/src/crypto/rsa.rs
@@ -82,9 +82,11 @@ impl RSA {
}
/// Reads an RSA private key from PEM formatted data and supplies a password callback.
+ ///
+ /// Requires the `catch_unwind` feature.
#[cfg(feature = "catch_unwind")]
pub fn private_key_from_pem_cb<R, F>(reader: &mut R, pass_cb: F) -> Result<RSA, SslError>
- where R: Read, F: FnMut(&mut [c_char]) -> usize
+ where R: Read, F: FnOnce(&mut [c_char]) -> usize
{
let mut cb = CallbackState::new(pass_cb);