From 3e5b65b7fafe9328e843bf3d52d0060ce7ac6aa9 Mon Sep 17 00:00:00 2001 From: Benjamin Fry Date: Sat, 5 Mar 2016 13:43:14 -0800 Subject: [PATCH] making from_raw() unsafe --- openssl/src/crypto/rsa.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openssl/src/crypto/rsa.rs b/openssl/src/crypto/rsa.rs index 3cd3ce75..6fcb5b07 100644 --- a/openssl/src/crypto/rsa.rs +++ b/openssl/src/crypto/rsa.rs @@ -29,7 +29,8 @@ impl RSA { } } - pub fn from_raw(rsa: *mut ffi::RSA) -> RSA { + /// the caller should assert that the rsa pointer is valid. + pub unsafe fn from_raw(rsa: *mut ffi::RSA) -> RSA { RSA(rsa) }