diff options
| author | Valerii Hiora <[email protected]> | 2014-09-12 20:37:23 +0300 |
|---|---|---|
| committer | Valerii Hiora <[email protected]> | 2014-09-23 17:49:08 +0300 |
| commit | 03871d368e1fdffd74ffad57197d55c4d59bd77b (patch) | |
| tree | ec3ea902bb67b8021877656563037721f36d42f1 /src/ssl/ffi.rs | |
| parent | Merge pull request #50 from vhbit/cert-fingerprint (diff) | |
| download | rust-openssl-03871d368e1fdffd74ffad57197d55c4d59bd77b.tar.xz rust-openssl-03871d368e1fdffd74ffad57197d55c4d59bd77b.zip | |
Enabling TLS1.2 support
Unfortunately OS X comes with 0.9.8 bundled. There is a way to
install a recent version through homebrew, however it is
extremely hard to make it link agains brewed version without
tricking link version
Diffstat (limited to 'src/ssl/ffi.rs')
| -rwxr-xr-x | src/ssl/ffi.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ssl/ffi.rs b/src/ssl/ffi.rs index 2e21a24b..d284353a 100755 --- a/src/ssl/ffi.rs +++ b/src/ssl/ffi.rs @@ -103,8 +103,17 @@ pub static X509_FILETYPE_PEM: c_int = 1; pub static X509_FILETYPE_ASN1: c_int = 2; pub static X509_FILETYPE_DEFAULT: c_int = 3; +#[cfg(target_os = "macos")] +#[link(name="ssl.1.0.0")] +#[link(name="crypto.1.0.0")] +extern {} + + +#[cfg(not(target_os = "macos"))] #[link(name="ssl")] #[link(name="crypto")] +extern {} + extern "C" { pub fn CRYPTO_num_locks() -> c_int; pub fn CRYPTO_set_locking_callback(func: extern "C" fn(mode: c_int, @@ -120,6 +129,8 @@ extern "C" { pub fn SSLv2_method() -> *const SSL_METHOD; pub fn SSLv3_method() -> *const SSL_METHOD; pub fn TLSv1_method() -> *const SSL_METHOD; + pub fn TLSv1_1_method() -> *const SSL_METHOD; + pub fn TLSv1_2_method() -> *const SSL_METHOD; pub fn SSLv23_method() -> *const SSL_METHOD; pub fn SSL_CTX_new(method: *const SSL_METHOD) -> *mut SSL_CTX; |