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

Move init to crate root

parent 77ba043a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -14,6 +14,9 @@ extern crate rustc_serialize as serialize;
#[cfg(test)]
extern crate net2;

#[doc(inline)]
pub use ffi::init;

use nid::Nid;

mod macros;
+2 −7
Original line number Diff line number Diff line
@@ -18,8 +18,9 @@ use libc::{c_uchar, c_uint};
#[cfg(any(feature = "npn", feature = "alpn"))]
use std::slice;
use std::marker::PhantomData;

use ffi;

use init;
use dh::DH;
use x509::{X509StoreContext, X509FileType, X509, X509Ref};
use crypto::pkey::PKey;
@@ -40,12 +41,6 @@ extern "C" {
    fn rust_SSL_CTX_clone(cxt: *mut ffi::SSL_CTX);
}

/// Manually initialize SSL.
/// It is optional to call this function and safe to do so more than once.
pub fn init() {
    ffi::init();
}

bitflags! {
    pub flags SslContextOptions: c_long {
        const SSL_OP_MICROSOFT_SESS_ID_BUG = ffi::SSL_OP_MICROSOFT_SESS_ID_BUG,