diff options
Diffstat (limited to 'src/ssl/lib.rs')
| -rw-r--r-- | src/ssl/lib.rs | 18 |
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(); + } +} |