Make SNI unique in TLS test#47459
Conversation
|
Tagging subscribers to this area: @dotnet/ncl Issue DetailsAs TLS 1.3 doesn't support renegotiation it can happen the connection is not negotiated when server switch between TLS 1.2 and 1.3.
|
40272f6 to
318e741
Compare
| using (X509Certificate2 clientCertificate = Configuration.Certificates.GetClientCertificate()) | ||
| { | ||
| string serverHost = serverCertificate.GetNameInfo(X509NameType.SimpleName, false); | ||
| string serverHost = Guid.NewGuid().ToString("N") + "." + serverCertificate.GetNameInfo(X509NameType.SimpleName, false); |
There was a problem hiding this comment.
since we have GUID, the name will not match. I'm not sure if appending the name from certificate have any value here and it seems unnecessary.
if anything I would encode name of the test and parameters so it is easier too find particular connection in capture file - purely optional to make debug easier.
There was a problem hiding this comment.
You are right, the PR contains fix for both tests now.
| server.AcceptConnectionSendResponseAndCloseAsync(), | ||
| client.GetAsync(url)); | ||
| server.AcceptConnectionSendResponseAndCloseAsync(), | ||
| client.GetAsync(url)); |
There was a problem hiding this comment.
Nit: Looks like accidental indentation change?
As TLS 1.3 doesn't support renegotiation it can happen the connection is not negotiated when server switch between TLS 1.2 and 1.3.
Fixes #47378