Unverified Commit 76c7dd11 authored by Steven Fackler's avatar Steven Fackler
Browse files

init in Pkey::ec_gen

3.0.3 fails to initialize things internally and segfaults in
OPENSSL_strcasecmp. Additionally, we want to disable the atexit cleanup
anyway.
parent e0628629
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -508,6 +508,8 @@ impl PKey<Private> {
    #[corresponds(EVP_EC_gen)]
    #[cfg(ossl300)]
    pub fn ec_gen(curve: &str) -> Result<PKey<Private>, ErrorStack> {
        ffi::init();

        let curve = CString::new(curve).unwrap();
        unsafe {
            let ptr = cvt_p(ffi::EVP_EC_gen(curve.as_ptr()))?;