aboutsummaryrefslogtreecommitdiff
path: root/openssl/src/bn/mod.rs
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2015-12-15 19:42:12 -0800
committerSteven Fackler <[email protected]>2015-12-15 19:42:12 -0800
commitcf075d8e6b7f5849a40659f380a660dc226a9118 (patch)
tree630ed9e2a3fcd047fd95a778977585803cd5a94a /openssl/src/bn/mod.rs
parentMerge branch 'release-v0.7.1' into release (diff)
parentRelease v0.7.2 (diff)
downloadrust-openssl-0.7.2.tar.xz
rust-openssl-0.7.2.zip
Merge branch 'release-v0.7.2' into releasev0.7.2
Diffstat (limited to 'openssl/src/bn/mod.rs')
-rw-r--r--openssl/src/bn/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/openssl/src/bn/mod.rs b/openssl/src/bn/mod.rs
index 3c973438..2d678da2 100644
--- a/openssl/src/bn/mod.rs
+++ b/openssl/src/bn/mod.rs
@@ -89,7 +89,7 @@ impl BigNum {
pub fn from_dec_str(s: &str) -> Result<BigNum, SslError> {
BigNum::new().and_then(|v| unsafe {
let c_str = CString::new(s.as_bytes()).unwrap();
- try_ssl!(ffi::BN_dec2bn(v.raw_ptr(), c_str.as_ptr()));
+ try_ssl!(ffi::BN_dec2bn(v.raw_ptr(), c_str.as_ptr() as *const _));
Ok(v)
})
}
@@ -97,7 +97,7 @@ impl BigNum {
pub fn from_hex_str(s: &str) -> Result<BigNum, SslError> {
BigNum::new().and_then(|v| unsafe {
let c_str = CString::new(s.as_bytes()).unwrap();
- try_ssl!(ffi::BN_hex2bn(v.raw_ptr(), c_str.as_ptr()));
+ try_ssl!(ffi::BN_hex2bn(v.raw_ptr(), c_str.as_ptr() as *const _));
Ok(v)
})
}
@@ -421,7 +421,7 @@ impl BigNum {
unsafe {
let buf = ffi::BN_bn2dec(self.raw());
assert!(!buf.is_null());
- let str = String::from_utf8(CStr::from_ptr(buf).to_bytes().to_vec()).unwrap();
+ let str = String::from_utf8(CStr::from_ptr(buf as *const _).to_bytes().to_vec()).unwrap();
ffi::CRYPTO_free(buf as *mut c_void);
str
}
@@ -431,7 +431,7 @@ impl BigNum {
unsafe {
let buf = ffi::BN_bn2hex(self.raw());
assert!(!buf.is_null());
- let str = String::from_utf8(CStr::from_ptr(buf).to_bytes().to_vec()).unwrap();
+ let str = String::from_utf8(CStr::from_ptr(buf as *const _).to_bytes().to_vec()).unwrap();
ffi::CRYPTO_free(buf as *mut c_void);
str
}