Skip to content

Add more renegotiate tests - #54609

Merged
aik-jahoda merged 4 commits into
dotnet:mainfrom
aik-jahoda:jajajhoda/tlsrenegotests
Jun 30, 2021
Merged

aik-jahoda merged 4 commits into
dotnet:mainfrom
aik-jahoda:jajajhoda/tlsrenegotests

Conversation

@aik-jahoda

Copy link
Copy Markdown
Contributor

We disallow App data frame during renegotiation. Adding test to cover this scenario.

@aik-jahoda
aik-jahoda requested a review from wfurt June 23, 2021 12:35
@ghost

ghost commented Jun 23, 2021

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/ncl, @vcsjones
See info in area-owners.md if you want to be subscribed.

Issue Details

We disallow App data frame during renegotiation. Adding test to cover this scenario.

Author: aik-jahoda
Assignees: -
Labels:

area-System.Net.Security

Milestone: -

@wfurt wfurt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally looks reasonable. I left few comments.

clientOptions.LocalCertificateSelectionCallback = (sender, targetHost, localCertificates, remoteCertificate, acceptableIssuers) =>
{
//Assert.True(false, "Clent shouldn't send certificate in this test");
return clientCertificate;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we even need the client certificate?

SslServerAuthenticationOptions serverOptions = new SslServerAuthenticationOptions() { ServerCertificate = serverCertificate };
serverOptions.RemoteCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) =>
{
//Assert.True(false, "Server shouldn't receive certificate in this test");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we even need the callback. It seems like we assert null certificate bellow.

@wfurt wfurt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wfurt

wfurt commented Jun 25, 2021

Copy link
Copy Markdown
Member

seems like the failures are in the new tests. You should investigate @aik-jahoda


Assert.Null(server.RemoteCertificate);

Console.WriteLine("AA " + server.SslProtocol);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If anything, you should use _output.WriteLineI(). That would show up on test failure as well as it would be captured in testResults.xml

@aik-jahoda
aik-jahoda force-pushed the jajajhoda/tlsrenegotests branch from 9cc6f06 to 4d31737 Compare June 29, 2021 11:49
@aik-jahoda

Copy link
Copy Markdown
Contributor Author

Merge with failures, those are unrelated to this PR

@aik-jahoda
aik-jahoda merged commit 5b58501 into dotnet:main Jun 30, 2021
@aik-jahoda
aik-jahoda deleted the jajajhoda/tlsrenegotests branch June 30, 2021 13:41
@karelz karelz added this to the 6.0.0 milestone Jul 15, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants