Skip to content

Commit f6f2abd

Browse files
authored
Add missing TlsAlertMessage members (#120260)
* Add missing TlsAllertMessages * Fix tests build
1 parent fc8c68f commit f6f2abd

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed

src/libraries/Common/src/System/Net/Security/TlsAlertMessage.cs

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ internal enum TlsAlertMessage
1212
RecordOverflow = 22, // error
1313
DecompressionFail = 30, // error
1414
HandshakeFailure = 40, // error
15+
NoCertificate = 41, // reserved - Used in SSLv3 but not in TLS
1516
BadCertificate = 42, // warning or error
1617
UnsupportedCert = 43, // warning or error
1718
CertificateRevoked = 44, // warning or error
@@ -22,12 +23,24 @@ internal enum TlsAlertMessage
2223
AccessDenied = 49, // error
2324
DecodeError = 50, // error
2425
DecryptError = 51, // error
26+
TooManyCidsRequested = 52, // error
2527
ExportRestriction = 60, // reserved
2628
ProtocolVersion = 70, // error
27-
InsuffientSecurity = 71, // error
29+
InsufficientSecurity = 71, // error
2830
InternalError = 80, // error
31+
InappropriateFallback = 86, // error
2932
UserCanceled = 90, // warning or error
3033
NoRenegotiation = 100, // warning
31-
UnsupportedExt = 110, // error
34+
MissingExtension = 109, // error
35+
UnsupportedExtension = 110, // error
36+
CertificateUnobtainable = 111, // reserved - Used in TLS versions prior to 1.3
37+
UnrecognizedName = 112, // error
38+
BadCertificateStatusResponse = 113, // error
39+
BadCertificateHashValue = 114, // reserved - Used in TLS versions prior to 1.3
40+
UnknownPskIdentity = 115, // error
41+
CertificateRequired = 116, // error
42+
GeneralError = 117, // error
43+
NoApplicationProtocol = 120, // error
44+
EchRequired = 121, // error
3245
}
3346
}

src/libraries/System.Net.Security/tests/UnitTests/TlsAlertsMatchWindowsInterop.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ public void TlsAlertEnums_MatchWindowsInterop_Ok()
3232
Assert.Equal((int)TlsAlertMessage.DecryptError, Interop.SChannel.TLS1_ALERT_DECRYPT_ERROR);
3333
Assert.Equal((int)TlsAlertMessage.ExportRestriction, Interop.SChannel.TLS1_ALERT_EXPORT_RESTRICTION);
3434
Assert.Equal((int)TlsAlertMessage.ProtocolVersion, Interop.SChannel.TLS1_ALERT_PROTOCOL_VERSION);
35-
Assert.Equal((int)TlsAlertMessage.InsuffientSecurity, Interop.SChannel.TLS1_ALERT_INSUFFIENT_SECURITY);
35+
Assert.Equal((int)TlsAlertMessage.InsufficientSecurity, Interop.SChannel.TLS1_ALERT_INSUFFIENT_SECURITY);
3636
Assert.Equal((int)TlsAlertMessage.InternalError, Interop.SChannel.TLS1_ALERT_INTERNAL_ERROR);
3737
Assert.Equal((int)TlsAlertMessage.UserCanceled, Interop.SChannel.TLS1_ALERT_USER_CANCELED);
3838
Assert.Equal((int)TlsAlertMessage.NoRenegotiation, Interop.SChannel.TLS1_ALERT_NO_RENEGOTIATION);
39-
Assert.Equal((int)TlsAlertMessage.UnsupportedExt, Interop.SChannel.TLS1_ALERT_UNSUPPORTED_EXT);
39+
Assert.Equal((int)TlsAlertMessage.UnsupportedExtension, Interop.SChannel.TLS1_ALERT_UNSUPPORTED_EXT);
4040
}
4141
}
4242
}

0 commit comments

Comments
 (0)