Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4bb9098

Browse files
authored
feat: expose configuration for SSLv3 (alexcrichton#265)
1 parent 7d11237 commit 4bb9098

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ legacy = []
3737
# Enables compilation of some older algorithms: md2 (hash), rc5 (block cypher) and enabled use of
3838
# some weaker algorithms in SSL connections. These are generally not recommended for use.
3939
weak-crypto = []
40+
# Enables compilation of SSLv3, which is disabled by default.
41+
ssl3 = []
4042
# Enables compilation of the Camellia symmetric key block cypher. Since hardware acceleration for
4143
# it is not available on most systems, this is not as used as AES.
4244
camellia = []

src/lib.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,6 @@ impl Build {
198198
// No shared objects, we just want static libraries
199199
.arg("no-shared")
200200
.arg("no-module")
201-
// Should be off by default on OpenSSL 1.1.0, but let's be extra sure
202-
.arg("no-ssl3")
203201
// No need to build tests, we won't run them anyway
204202
.arg("no-tests")
205203
// Nothing related to zlib please
@@ -222,6 +220,13 @@ impl Build {
222220
configure.arg("no-legacy");
223221
}
224222

223+
if cfg!(feature = "ssl3") {
224+
configure.arg("enable-ssl3").arg("enable-ssl3-method");
225+
} else {
226+
// Should be off by default on OpenSSL 1.1.0, but let's be extra sure
227+
configure.arg("no-ssl3");
228+
}
229+
225230
if cfg!(feature = "weak-crypto") {
226231
configure
227232
.arg("enable-md2")

0 commit comments

Comments
 (0)