Commit f34af836 authored by Steven Fackler's avatar Steven Fackler
Browse files

Init in bn_ctx constructor

parent d1a42598
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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)
        }
    }
}