aboutsummaryrefslogtreecommitdiff
path: root/openssl/src
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2017-07-30 13:24:36 -0700
committerSteven Fackler <[email protected]>2017-07-30 13:24:36 -0700
commitf34af836533dbe85a10b115ab1259d2ebeb331c4 (patch)
treec92070cd3163e99e51c5bc2a2478366bd0564dcb /openssl/src
parentInit in Dh constructors (diff)
downloadrust-openssl-f34af836533dbe85a10b115ab1259d2ebeb331c4.tar.xz
rust-openssl-f34af836533dbe85a10b115ab1259d2ebeb331c4.zip
Init in bn_ctx constructor
Diffstat (limited to 'openssl/src')
-rw-r--r--openssl/src/bn.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/openssl/src/bn.rs b/openssl/src/bn.rs
index e3de8672..46d7d8f3 100644
--- a/openssl/src/bn.rs
+++ b/openssl/src/bn.rs
@@ -52,7 +52,10 @@ foreign_type! {
impl BigNumContext {
/// Returns a new `BigNumContext`.
pub fn new() -> Result<BigNumContext, ErrorStack> {
- unsafe { cvt_p(ffi::BN_CTX_new()).map(BigNumContext) }
+ unsafe {
+ ffi::init();
+ cvt_p(ffi::BN_CTX_new()).map(BigNumContext)
+ }
}
}