Update for attributes on match arms
This commit is contained in:
parent
0c1e4194f5
commit
4e54038ffc
13
ssl/mod.rs
13
ssl/mod.rs
|
|
@ -58,24 +58,15 @@ pub enum SslMethod {
|
|||
}
|
||||
|
||||
impl SslMethod {
|
||||
unsafe fn to_raw(&self) -> *ffi::SSL_METHOD {
|
||||
match *self {
|
||||
#[cfg(sslv2)]
|
||||
unsafe fn to_raw(&self) -> *ffi::SSL_METHOD {
|
||||
match *self {
|
||||
Sslv2 => ffi::SSLv2_method(),
|
||||
Sslv3 => ffi::SSLv3_method(),
|
||||
Tlsv1 => ffi::TLSv1_method(),
|
||||
Sslv23 => ffi::SSLv23_method()
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(sslv2))]
|
||||
unsafe fn to_raw(&self) -> *ffi::SSL_METHOD {
|
||||
match *self {
|
||||
Sslv3 => ffi::SSLv3_method(),
|
||||
Tlsv1 => ffi::TLSv1_method(),
|
||||
Sslv23 => ffi::SSLv23_method()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Determines the type of certificate verification used
|
||||
|
|
|
|||
Loading…
Reference in New Issue