From 5f017cd549b4c76849bfd5c33e6f6962acd89535 Mon Sep 17 00:00:00 2001 From: Jared Roesch Date: Sat, 11 Oct 2014 01:50:34 -0700 Subject: Refactor init and error handling code Move common ffi initialization code to 'ffi::init()' and the initialization of error handling to a a shared location. --- src/ssl/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/ssl/mod.rs') diff --git a/src/ssl/mod.rs b/src/ssl/mod.rs index 31307a03..33112f7a 100644 --- a/src/ssl/mod.rs +++ b/src/ssl/mod.rs @@ -23,9 +23,8 @@ fn init() { unsafe { INIT.doit(|| { - ffi::SSL_library_init(); - ffi::SSL_load_error_strings(); - ffi::ERR_load_crypto_strings(); + ffi::init(); + let verify_idx = ffi::SSL_CTX_get_ex_new_index(0, ptr::null(), None, None, None); assert!(verify_idx >= 0); -- cgit v1.2.3