Disable TLS 1.0 and 1.1

This commit is contained in:
Jan Andre Ikenmeyer 2019-05-10 14:53:32 +02:00
parent b1b47d8046
commit 25333b6451
No known key found for this signature in database
GPG key ID: 28F9E42748DD95AE

View file

@ -77,8 +77,13 @@ pub fn create_ssl_connector_builder(certs: &str) -> SslConnectorBuilder {
ssl_connector_builder
.set_cipher_list(DEFAULT_CIPHERS)
.expect("could not set ciphers");
ssl_connector_builder
.set_options(SslOptions::NO_SSLV2 | SslOptions::NO_SSLV3 | SslOptions::NO_COMPRESSION);
ssl_connector_builder.set_options(
SslOptions::NO_SSLV2 |
SslOptions::NO_SSLV3 |
SslOptions::NO_TLSV1 |
SslOptions::NO_TLSV1_1 |
SslOptions::NO_COMPRESSION,
);
ssl_connector_builder
}