aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2013-11-09 17:27:17 -0800
committerSteven Fackler <[email protected]>2013-11-09 17:32:33 -0800
commit2e168ab820384c543faaa4eabf4004dfc1670851 (patch)
treeaa2e7cb1a524977735ca4acc855889d7902c674b
parentSsl errors may return a stack (diff)
downloadrust-openssl-2e168ab820384c543faaa4eabf4004dfc1670851.tar.xz
rust-openssl-2e168ab820384c543faaa4eabf4004dfc1670851.zip
Update for latest master and fix segfault
-rw-r--r--.gitignore2
-rw-r--r--ffi.rs4
-rw-r--r--lib.rs5
-rw-r--r--test.rs (renamed from tests.rs)7
4 files changed, 9 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index 502167fa..6706cdd9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/lib
+/.rust/
diff --git a/ffi.rs b/ffi.rs
index deb552e7..7711032c 100644
--- a/ffi.rs
+++ b/ffi.rs
@@ -11,10 +11,10 @@ pub type BIO_METHOD = c_void;
pub type X509_STORE_CTX = c_void;
pub type CRYPTO_EX_DATA = c_void;
-pub type CRYPTO_EX_new = Option<extern "C" fn(parent: *c_void, ptr: *c_void,
+pub type CRYPTO_EX_new = extern "C" fn(parent: *c_void, ptr: *c_void,
ad: *CRYPTO_EX_DATA, idx: c_int,
argl: c_long, argp: *c_void)
- -> c_int>;
+ -> c_int;
pub type CRYPTO_EX_dup = extern "C" fn(to: *CRYPTO_EX_DATA,
from: *CRYPTO_EX_DATA, from_d: *c_void,
idx: c_int, argl: c_long, argp: *c_void)
diff --git a/lib.rs b/lib.rs
index 2742a48f..4ca8fd10 100644
--- a/lib.rs
+++ b/lib.rs
@@ -9,13 +9,10 @@ use std::unstable::atomics::{AtomicBool, INIT_ATOMIC_BOOL, AtomicInt,
use std::rt::io::{Stream, Reader, Writer, Decorator};
use std::vec;
-use error::{SslError, SslSessionClosed, StreamEof};
+use self::error::{SslError, SslSessionClosed, StreamEof};
pub mod error;
-#[cfg(test)]
-mod tests;
-
mod ffi;
static mut STARTED_INIT: AtomicBool = INIT_ATOMIC_BOOL;
diff --git a/tests.rs b/test.rs
index 9ea5c00c..dbcb19db 100644
--- a/tests.rs
+++ b/test.rs
@@ -1,9 +1,12 @@
+#[feature(struct_variant)];
+
use std::rt::io::Writer;
-use std::rt::io::extensions::ReaderUtil;
use std::rt::io::net::tcp::TcpStream;
use std::str;
-use super::{Sslv23, SslContext, SslStream, SslVerifyPeer};
+use lib::{Sslv23, SslContext, SslStream, SslVerifyPeer};
+
+mod lib;
#[test]
fn test_new_ctx() {