mirror of https://github.com/ctz/rustls
TLS1.3: swallow user_cancelled warning alerts
This commit is contained in:
parent
278009aa58
commit
222bfa8d12
|
@ -501,9 +501,10 @@ impl SessionCommon {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Warnings are nonfatal for TLS1.2, but outlawed in TLS1.3.
|
// Warnings are nonfatal for TLS1.2, but outlawed in TLS1.3
|
||||||
|
// (except, for no good reason, user_cancelled).
|
||||||
if alert.level == AlertLevel::Warning {
|
if alert.level == AlertLevel::Warning {
|
||||||
if self.is_tls13() {
|
if self.is_tls13() && alert.description != AlertDescription::UserCanceled {
|
||||||
self.send_fatal_alert(AlertDescription::DecodeError);
|
self.send_fatal_alert(AlertDescription::DecodeError);
|
||||||
} else {
|
} else {
|
||||||
warn!("TLS alert warning received: {:#?}", msg);
|
warn!("TLS alert warning received: {:#?}", msg);
|
||||||
|
|
Loading…
Reference in New Issue