aboutsummaryrefslogtreecommitdiff
path: root/src/ssl/ffi.rs
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2013-10-05 10:56:36 -0700
committerSteven Fackler <[email protected]>2013-10-05 10:56:36 -0700
commit58eb7ab5c4e29922e6cee4c21ca5420e3504a654 (patch)
treea278e977833589e4a934f749e2d57f92155c2bd5 /src/ssl/ffi.rs
parentBasic library initialization (diff)
downloadrust-openssl-58eb7ab5c4e29922e6cee4c21ca5420e3504a654.tar.xz
rust-openssl-58eb7ab5c4e29922e6cee4c21ca5420e3504a654.zip
Create contexts
Diffstat (limited to 'src/ssl/ffi.rs')
-rw-r--r--src/ssl/ffi.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ssl/ffi.rs b/src/ssl/ffi.rs
new file mode 100644
index 00000000..788765fb
--- /dev/null
+++ b/src/ssl/ffi.rs
@@ -0,0 +1,14 @@
+use std::libc::{c_int, c_void};
+
+pub type SSL_CTX = c_void;
+pub type SSL_METHOD = c_void;
+
+#[link_args = "-lssl"]
+extern "C" {
+ fn SSL_library_init() -> c_int;
+ fn SSL_load_error_strings();
+
+ fn SSL_CTX_new(method: *SSL_METHOD) -> *SSL_CTX;
+ fn SSLv23_method() -> *SSL_METHOD;
+ fn SSL_CTX_free(ctx: *SSL_CTX);
+}