Skip to content

Commit 342ec6d

Browse files
author
Guanqun Lu
committed
remove unsafe sslv2 and sslv3 methods
1 parent 05d88bf commit 342ec6d

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/cargo/ops/registry.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,14 +443,12 @@ pub fn configure_http_handle(config: &Config, handle: &mut Easy) -> CargoResult<
443443
if let Some(ssl_version) = config.get_string("http.ssl-version")? {
444444
let version = match ssl_version.val.as_str() {
445445
"default" => SslVersion::Default,
446-
"sslv2" => SslVersion::Sslv2,
447-
"sslv3" => SslVersion::Sslv3,
448446
"tlsv1" => SslVersion::Tlsv1,
449447
"tlsv1.0" => SslVersion::Tlsv10,
450448
"tlsv1.1" => SslVersion::Tlsv11,
451449
"tlsv1.2" => SslVersion::Tlsv12,
452450
"tlsv1.3" => SslVersion::Tlsv13,
453-
_ => bail!("Invalid ssl version `{}`, choose from 'default', 'sslv2', 'sslv3', 'tlsv1', 'tlsv1.0', 'tlsv1.1', 'tlsv1.2', 'tlsv1.3'.", &ssl_version.val),
451+
_ => bail!("Invalid ssl version `{}`, choose from 'default', 'tlsv1', 'tlsv1.0', 'tlsv1.1', 'tlsv1.2', 'tlsv1.3'.", &ssl_version.val),
454452
};
455453
handle.ssl_min_max_version(version, version)?;
456454
}

src/doc/src/reference/config.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@ timeout = 30 # Timeout for each HTTP request, in seconds
108108
cainfo = "cert.pem" # Path to Certificate Authority (CA) bundle (optional)
109109
check-revoke = true # Indicates whether SSL certs are checked for revocation
110110
ssl-version = "tlsv1.3" # Indicates which SSL version to use (defaults to
111-
# "default", "sslv2", "sslv3", "tlsv1", "tlsv1.0",
112-
# "tlsv1.1", "tlsv1.2", "tlsv1.3")
111+
# "default", "tlsv1", "tlsv1.0", "tlsv1.1", "tlsv1.2", "tlsv1.3")
113112
low-speed-limit = 5 # Lower threshold for bytes/sec (10 = default, 0 = disabled)
114113
multiplexing = true # whether or not to use HTTP/2 multiplexing where possible
115114

0 commit comments

Comments
 (0)