aboutsummaryrefslogtreecommitdiff
path: root/src/ssl/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ssl/lib.rs')
-rw-r--r--src/ssl/lib.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ssl/lib.rs b/src/ssl/lib.rs
new file mode 100644
index 00000000..d52a0cfa
--- /dev/null
+++ b/src/ssl/lib.rs
@@ -0,0 +1,18 @@
+
+mod ffi {
+ use std::libc::{c_int};
+
+ #[link_args = "-lssl"]
+ extern "C" {
+ fn SSL_library_init() -> c_int;
+ fn SSL_load_error_strings();
+ }
+}
+
+#[fixed_stack_segment]
+pub fn init() {
+ unsafe {
+ ffi::SSL_library_init();
+ ffi::SSL_load_error_strings();
+ }
+}