diff options
| author | Valerii Hiora <[email protected]> | 2014-09-23 18:13:48 +0300 |
|---|---|---|
| committer | Valerii Hiora <[email protected]> | 2014-09-23 18:29:43 +0300 |
| commit | 4c1edcf4c8aa00ec3bb8ff0c0e8627a91a36792f (patch) | |
| tree | 11e44929ef4d100aee27513b5c8a2952d271590d /src/ssl/mod.rs | |
| parent | Enabling TLS1.2 support (diff) | |
| download | rust-openssl-4c1edcf4c8aa00ec3bb8ff0c0e8627a91a36792f.tar.xz rust-openssl-4c1edcf4c8aa00ec3bb8ff0c0e8627a91a36792f.zip | |
TLS 1_1, 1_2, Ssl 2 is enabled by features
Diffstat (limited to 'src/ssl/mod.rs')
| -rw-r--r-- | src/ssl/mod.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ssl/mod.rs b/src/ssl/mod.rs index f0961ce9..fc775a32 100644 --- a/src/ssl/mod.rs +++ b/src/ssl/mod.rs @@ -50,7 +50,7 @@ fn init() { #[deriving(Show, Hash, PartialEq, Eq)] #[allow(non_camel_case_types)] pub enum SslMethod { - #[cfg(sslv2)] + #[cfg(feature = "sslv2")] /// Only support the SSLv2 protocol Sslv2, /// Only support the SSLv3 protocol @@ -59,19 +59,23 @@ pub enum SslMethod { Tlsv1, /// Support the SSLv2, SSLv3 and TLSv1 protocols Sslv23, + #[cfg(feature = "tlsv1_1")] Tlsv1_1, + #[cfg(feature = "tlsv1_2")] Tlsv1_2, } impl SslMethod { unsafe fn to_raw(&self) -> *const ffi::SSL_METHOD { match *self { - #[cfg(sslv2)] + #[cfg(feature = "sslv2")] Sslv2 => ffi::SSLv2_method(), Sslv3 => ffi::SSLv3_method(), Tlsv1 => ffi::TLSv1_method(), Sslv23 => ffi::SSLv23_method(), + #[cfg(feature = "tlsv1_1")] Tlsv1_1 => ffi::TLSv1_1_method(), + #[cfg(feature = "tlsv1_2")] Tlsv1_2 => ffi::TLSv1_2_method() } } |