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/mod.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/mod.rs')
| -rw-r--r-- | src/ssl/mod.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ssl/mod.rs b/src/ssl/mod.rs index 785b8dfc..f0961ce9 100644 --- a/src/ssl/mod.rs +++ b/src/ssl/mod.rs @@ -48,6 +48,7 @@ fn init() { /// Determines the SSL method supported #[deriving(Show, Hash, PartialEq, Eq)] +#[allow(non_camel_case_types)] pub enum SslMethod { #[cfg(sslv2)] /// Only support the SSLv2 protocol @@ -58,6 +59,8 @@ pub enum SslMethod { Tlsv1, /// Support the SSLv2, SSLv3 and TLSv1 protocols Sslv23, + Tlsv1_1, + Tlsv1_2, } impl SslMethod { @@ -67,7 +70,9 @@ impl SslMethod { Sslv2 => ffi::SSLv2_method(), Sslv3 => ffi::SSLv3_method(), Tlsv1 => ffi::TLSv1_method(), - Sslv23 => ffi::SSLv23_method() + Sslv23 => ffi::SSLv23_method(), + Tlsv1_1 => ffi::TLSv1_1_method(), + Tlsv1_2 => ffi::TLSv1_2_method() } } } |