aboutsummaryrefslogtreecommitdiff
path: root/openssl/src
diff options
context:
space:
mode:
authorBenjamin Fry <[email protected]>2016-03-05 13:43:14 -0800
committerBenjamin Fry <[email protected]>2016-03-05 13:43:14 -0800
commit3e5b65b7fafe9328e843bf3d52d0060ce7ac6aa9 (patch)
treea9234c299255f6e345fee0adf6521873eeed7d51 /openssl/src
parentadded public key material to the constructor (diff)
downloadrust-openssl-3e5b65b7fafe9328e843bf3d52d0060ce7ac6aa9.tar.xz
rust-openssl-3e5b65b7fafe9328e843bf3d52d0060ce7ac6aa9.zip
making from_raw() unsafe
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 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)
}