Skip to content

Commit

Permalink
unfortunately, depending on the lib's version, the API of rust-openss…
Browse files Browse the repository at this point in the history
…l changes
  • Loading branch information
Geal committed Jul 18, 2019
1 parent c156882 commit fd32947
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/src/https_openssl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,9 @@ impl Listener {
let mut ssl_options = ssl::SslOptions::CIPHER_SERVER_PREFERENCE | ssl::SslOptions::NO_COMPRESSION | ssl::SslOptions::NO_TICKET;
let mut versions = ssl::SslOptions::NO_SSLV2 | ssl::SslOptions::NO_SSLV3 |
ssl::SslOptions::NO_TLSV1 | ssl::SslOptions::NO_TLSV1_1 |
ssl::SslOptions::NO_TLSV1_2 | ssl::SslOptions::NO_TLSV1_3;
ssl::SslOptions::NO_TLSV1_2
//FIXME: the value will not be available if openssl-sys does not find an OpenSSL v1.1
/*| ssl::SslOptions::NO_TLSV1_3*/;

for version in config.versions.iter() {
match version {
Expand All @@ -880,7 +882,7 @@ impl Listener {
TlsVersion::TLSv1_0 => versions.remove(ssl::SslOptions::NO_TLSV1),
TlsVersion::TLSv1_1 => versions.remove(ssl::SslOptions::NO_TLSV1_1),
TlsVersion::TLSv1_2 => versions.remove(ssl::SslOptions::NO_TLSV1_2),
TlsVersion::TLSv1_3 => versions.remove(ssl::SslOptions::NO_TLSV1_3),
//TlsVersion::TLSv1_3 => versions.remove(ssl::SslOptions::NO_TLSV1_3),
s => error!("unrecognized TLS version: {:?}", s)
};
}
Expand Down

0 comments on commit fd32947

Please sign in to comment.