aboutsummaryrefslogtreecommitdiff
path: root/openssl/src
diff options
context:
space:
mode:
authorJonas Schievink <[email protected]>2016-06-26 18:24:47 +0200
committerJonas Schievink <[email protected]>2016-06-26 18:25:54 +0200
commit351bc569a46ab1590736114a50179351de8719d7 (patch)
tree4f3f6e09b9170a1592b5e695596e9719a96ee046 /openssl/src
parentAdd an RSA key decryption test (diff)
downloadrust-openssl-351bc569a46ab1590736114a50179351de8719d7.tar.xz
rust-openssl-351bc569a46ab1590736114a50179351de8719d7.zip
Put the test behind the catch_unwind feature
And fix an unused variable warning
Diffstat (limited to 'openssl/src')
-rw-r--r--openssl/src/crypto/rsa.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/openssl/src/crypto/rsa.rs b/openssl/src/crypto/rsa.rs
index d0303283..9a04bf7f 100644
--- a/openssl/src/crypto/rsa.rs
+++ b/openssl/src/crypto/rsa.rs
@@ -305,10 +305,11 @@ mod test {
}
#[test]
+ #[cfg(feature = "catch_unwind")]
pub fn test_password() {
let mut password_queried = false;
let mut buffer = File::open("test/rsa-encrypted.pem").unwrap();
- let rsa = RSA::private_key_from_pem_cb(&mut buffer, |password| {
+ RSA::private_key_from_pem_cb(&mut buffer, |password| {
password_queried = true;
password[0] = b'm' as _;
password[1] = b'y' as _;