diff options
| author | Steven Fackler <[email protected]> | 2018-03-29 10:20:18 +0200 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2018-03-29 10:20:18 +0200 |
| commit | 1bbe1b6a8f104cc9694a5e65d9b58ad2e3af9740 (patch) | |
| tree | c37af48b1656cff5356bb764301b56d4439686b1 /openssl/src/ssl/connector.rs | |
| parent | Merge pull request #888 from sfackler/version-bumps (diff) | |
| download | rust-openssl-1bbe1b6a8f104cc9694a5e65d9b58ad2e3af9740.tar.xz rust-openssl-1bbe1b6a8f104cc9694a5e65d9b58ad2e3af9740.zip | |
Clean up a couple of holdovers from old features
Diffstat (limited to 'openssl/src/ssl/connector.rs')
| -rw-r--r-- | openssl/src/ssl/connector.rs | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/openssl/src/ssl/connector.rs b/openssl/src/ssl/connector.rs index 89eb0ac3..9966a5a0 100644 --- a/openssl/src/ssl/connector.rs +++ b/openssl/src/ssl/connector.rs @@ -192,11 +192,7 @@ impl SslAcceptor { pub fn mozilla_intermediate(method: SslMethod) -> Result<SslAcceptorBuilder, ErrorStack> { let mut ctx = ctx(method)?; #[cfg(ossl111)] - { - ctx.set_options(SslOptions { - bits: ::ffi::SSL_OP_NO_TLSv1_3, - }); - } + ctx.set_options(SslOptions::NO_TLSV1_3); let dh = Dh::params_from_pem( b" -----BEGIN DH PARAMETERS----- @@ -236,11 +232,7 @@ ssbzSibBsu/6iGtCOGEoXJf//////////wIBAg== let mut ctx = ctx(method)?; ctx.set_options(SslOptions::NO_TLSV1 | SslOptions::NO_TLSV1_1); #[cfg(ossl111)] - { - ctx.set_options(SslOptions { - bits: ::ffi::SSL_OP_NO_TLSv1_3, - }); - } + ctx.set_options(SslOptions::NO_TLSV1_3); setup_curves(&mut ctx)?; ctx.set_cipher_list( "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:\ @@ -316,8 +308,10 @@ fn setup_verify(ctx: &mut SslContextBuilder) { #[cfg(any(ossl102, ossl110))] fn setup_verify_hostname(ssl: &mut Ssl, domain: &str) -> Result<(), ErrorStack> { + use x509::verify::X509CheckFlags; + let param = ssl.param_mut(); - param.set_hostflags(::verify::X509CheckFlags::NO_PARTIAL_WILDCARDS); + param.set_hostflags(X509CheckFlags::NO_PARTIAL_WILDCARDS); match domain.parse() { Ok(ip) => param.set_ip(ip), Err(_) => param.set_host(domain), |