diff --git a/openssl/src/bn/mod.rs b/openssl/src/bn/mod.rs index ba1121dd..00a0a0ca 100644 --- a/openssl/src/bn/mod.rs +++ b/openssl/src/bn/mod.rs @@ -108,7 +108,7 @@ impl BigNum { } let r = ffi::BN_dup(orig); if r.is_null() { - panic!("Unexpected null pointer from BN_dup(..)") + Err(SslError::get()) } else { Ok(BigNum(r)) } diff --git a/openssl/src/crypto/rsa.rs b/openssl/src/crypto/rsa.rs index 85a13609..fca94465 100644 --- a/openssl/src/crypto/rsa.rs +++ b/openssl/src/crypto/rsa.rs @@ -41,6 +41,6 @@ impl RSA { impl fmt::Debug for RSA { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f, "Currently no debug output. Sorry :(") + write!(f, "RSA") } }