-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Make SNI unique in TLS test #47459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generaly looks good to me.
The example from #47378 was HTTP test so I think we should not close it until we fix HTTP as well.
@@ -79,7 +79,7 @@ public async Task ClientAndServer_OneOrBothUseDefault_Ok(SslProtocols? clientPro | |||
using (X509Certificate2 serverCertificate = Configuration.Certificates.GetServerCertificate()) | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, the PR contains fix for both tests now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
server.AcceptConnectionSendResponseAndCloseAsync(), | ||
client.GetAsync(url)); | ||
server.AcceptConnectionSendResponseAndCloseAsync(), | ||
client.GetAsync(url)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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