From f34af836533dbe85a10b115ab1259d2ebeb331c4 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 30 Jul 2017 13:24:36 -0700 Subject: [PATCH] Init in bn_ctx constructor --- openssl/src/bn.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 { - unsafe { cvt_p(ffi::BN_CTX_new()).map(BigNumContext) } + unsafe { + ffi::init(); + cvt_p(ffi::BN_CTX_new()).map(BigNumContext) + } } }