From afe01849bc8ba4db3f4bf4bf8e6f1a7524c07088 Mon Sep 17 00:00:00 2001 From: Radek Zikmund Date: Tue, 30 Sep 2025 16:42:15 +0200 Subject: [PATCH 1/2] Add missing TlsAllertMessages --- .../src/System/Net/Security/TlsAlertMessage.cs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/libraries/Common/src/System/Net/Security/TlsAlertMessage.cs b/src/libraries/Common/src/System/Net/Security/TlsAlertMessage.cs index 676e8791f21030..970f12aaaa608f 100644 --- a/src/libraries/Common/src/System/Net/Security/TlsAlertMessage.cs +++ b/src/libraries/Common/src/System/Net/Security/TlsAlertMessage.cs @@ -12,6 +12,7 @@ internal enum TlsAlertMessage RecordOverflow = 22, // error DecompressionFail = 30, // error HandshakeFailure = 40, // error + NoCertificate = 41, // reserved - Used in SSLv3 but not in TLS BadCertificate = 42, // warning or error UnsupportedCert = 43, // warning or error CertificateRevoked = 44, // warning or error @@ -22,12 +23,24 @@ internal enum TlsAlertMessage AccessDenied = 49, // error DecodeError = 50, // error DecryptError = 51, // error + TooManyCidsRequested = 52, // error ExportRestriction = 60, // reserved ProtocolVersion = 70, // error - InsuffientSecurity = 71, // error + InsufficientSecurity = 71, // error InternalError = 80, // error + InappropriateFallback = 86, // error UserCanceled = 90, // warning or error NoRenegotiation = 100, // warning - UnsupportedExt = 110, // error + MissingExtension = 109, // error + UnsupportedExtension = 110, // error + CertificateUnobtainable = 111, // reserved - Used in TLS versions prior to 1.3 + UnrecognizedName = 112, // error + BadCertificateStatusResponse = 113, // error + BadCertificateHashValue = 114, // reserved - Used in TLS versions prior to 1.3 + UnknownPskIdentity = 115, // error + CertificateRequired = 116, // error + GeneralError = 117, // error + NoApplicationProtocol = 120, // error + EchRequired = 121, // error } } From cc65ce4f9aedbdbe0c82f4096cc23794fad4666b Mon Sep 17 00:00:00 2001 From: Radek Zikmund Date: Tue, 30 Sep 2025 16:46:35 +0200 Subject: [PATCH 2/2] Fix tests build --- .../tests/UnitTests/TlsAlertsMatchWindowsInterop.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libraries/System.Net.Security/tests/UnitTests/TlsAlertsMatchWindowsInterop.cs b/src/libraries/System.Net.Security/tests/UnitTests/TlsAlertsMatchWindowsInterop.cs index 1481e030554289..3627b6aa9a6ee6 100644 --- a/src/libraries/System.Net.Security/tests/UnitTests/TlsAlertsMatchWindowsInterop.cs +++ b/src/libraries/System.Net.Security/tests/UnitTests/TlsAlertsMatchWindowsInterop.cs @@ -32,11 +32,11 @@ public void TlsAlertEnums_MatchWindowsInterop_Ok() Assert.Equal((int)TlsAlertMessage.DecryptError, Interop.SChannel.TLS1_ALERT_DECRYPT_ERROR); Assert.Equal((int)TlsAlertMessage.ExportRestriction, Interop.SChannel.TLS1_ALERT_EXPORT_RESTRICTION); Assert.Equal((int)TlsAlertMessage.ProtocolVersion, Interop.SChannel.TLS1_ALERT_PROTOCOL_VERSION); - Assert.Equal((int)TlsAlertMessage.InsuffientSecurity, Interop.SChannel.TLS1_ALERT_INSUFFIENT_SECURITY); + Assert.Equal((int)TlsAlertMessage.InsufficientSecurity, Interop.SChannel.TLS1_ALERT_INSUFFIENT_SECURITY); Assert.Equal((int)TlsAlertMessage.InternalError, Interop.SChannel.TLS1_ALERT_INTERNAL_ERROR); Assert.Equal((int)TlsAlertMessage.UserCanceled, Interop.SChannel.TLS1_ALERT_USER_CANCELED); Assert.Equal((int)TlsAlertMessage.NoRenegotiation, Interop.SChannel.TLS1_ALERT_NO_RENEGOTIATION); - Assert.Equal((int)TlsAlertMessage.UnsupportedExt, Interop.SChannel.TLS1_ALERT_UNSUPPORTED_EXT); + Assert.Equal((int)TlsAlertMessage.UnsupportedExtension, Interop.SChannel.TLS1_ALERT_UNSUPPORTED_EXT); } } }