diff --git a/ffi.rs b/ffi.rs index 6c8d5bb1..e63c63a1 100644 --- a/ffi.rs +++ b/ffi.rs @@ -23,7 +23,7 @@ pub static SSL_ERROR_WANT_ACCEPT: c_int = 8; pub static SSL_VERIFY_NONE: c_int = 0; pub static SSL_VERIFY_PEER: c_int = 1; -#[link_args = "-lssl"] +#[link_args = "-lssl -lcrypto"] extern "C" { } externfn!(fn ERR_get_error() -> c_ulong) diff --git a/lib.rs b/lib.rs index 8acf5940..fdf827ca 100644 --- a/lib.rs +++ b/lib.rs @@ -9,6 +9,9 @@ use std::libc::{c_int, c_void}; mod ffi; +#[cfg(test)] +mod tests; + static mut STARTED_INIT: AtomicBool = INIT_ATOMIC_BOOL; static mut FINISHED_INIT: AtomicBool = INIT_ATOMIC_BOOL; diff --git a/test.rs b/tests.rs similarity index 96% rename from test.rs rename to tests.rs index 557f6dec..639ce1b1 100644 --- a/test.rs +++ b/tests.rs @@ -1,11 +1,9 @@ -extern mod ssl; - use std::rt::io::Writer; use std::rt::io::extensions::ReaderUtil; use std::rt::io::net::tcp::TcpStream; use std::str; -use ssl::{Sslv23, SslCtx, SslStream, SslVerifyPeer}; +use super::{Sslv23, SslCtx, SslStream, SslVerifyPeer}; #[test] fn test_new_ctx() {