diff options
| author | Steven Fackler <[email protected]> | 2017-07-25 21:59:52 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2017-07-25 21:59:52 -0700 |
| commit | 01927c19acfdc6a601c7f06c7c11c83f7e4b8921 (patch) | |
| tree | 6b46578d0c4930379679baf83c5d4f338937290e /openssl-sys/src | |
| parent | Fix build (diff) | |
| download | rust-openssl-01927c19acfdc6a601c7f06c7c11c83f7e4b8921.tar.xz rust-openssl-01927c19acfdc6a601c7f06c7c11c83f7e4b8921.zip | |
Initialize OpenSSL in DSA constructor
This fixes the double unlock errors that were popping up on circle
Diffstat (limited to 'openssl-sys/src')
| -rw-r--r-- | openssl-sys/src/ossl10x.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/openssl-sys/src/ossl10x.rs b/openssl-sys/src/ossl10x.rs index 6f802bdf..b5adb828 100644 --- a/openssl-sys/src/ossl10x.rs +++ b/openssl-sys/src/ossl10x.rs @@ -3,6 +3,7 @@ use std::sync::{Once, ONCE_INIT}; use std::mem; use std::ptr; use std::process; +use std::io::{self, Write}; use libc::{c_int, c_char, c_void, c_long, c_uchar, size_t, c_uint, c_ulong}; #[cfg(not(ossl101))] @@ -748,7 +749,11 @@ unsafe extern "C" fn locking_function(mode: c_int, n: c_int, _file: *const c_cha (*GUARDS)[n as usize] = Some(mutex.lock().unwrap()); } else { if let None = (*GUARDS)[n as usize].take() { - println!("lock {} already unlocked", n); + let _ = writeln!( + io::stderr(), + "BUG: rust-openssl lock {} already unlocked, aborting", + n + ); process::abort(); } } |