Init in bn_ctx constructor

This commit is contained in:
Steven Fackler 2017-07-30 13:24:36 -07:00
parent d1a42598d7
commit f34af83653
1 changed files with 4 additions and 1 deletions

View File

@ -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)
}
}
}