Skip to content
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

SslStream mutates state of Client/ServerAuthenticationOptions #25692

Closed
krwq opened this issue Mar 30, 2018 · 3 comments
Closed

SslStream mutates state of Client/ServerAuthenticationOptions #25692

krwq opened this issue Mar 30, 2018 · 3 comments
Assignees
Milestone

Comments

@krwq
Copy link
Member

krwq commented Mar 30, 2018

Comment from @stephentoub in dotnet/corefx#28278 has pointed to the issue we have in SslStream where we mutate Options object.

The problem with mutating the object is that sharing the same Options across different SslStream instance can cause races and make different than expected callback be called.

Examples of mutating state:
https://github.com/krwq/corefx/blob/705e95f02d179cccc6a290e5cf9f05fbd9873ed3/src/System.Net.Security/src/System/Net/Security/SslStream.cs#L252
https://github.com/krwq/corefx/blob/705e95f02d179cccc6a290e5cf9f05fbd9873ed3/src/System.Net.Security/src/System/Net/Security/SslStream.cs#L323
https://github.com/krwq/corefx/blob/705e95f02d179cccc6a290e5cf9f05fbd9873ed3/src/System.Net.Security/src/System/Net/Security/SslStream.cs#L360

@krwq
Copy link
Member Author

krwq commented Mar 30, 2018

@karelz this is a good candidate for 2.1 fix, I could pick this up

@karelz
Copy link
Member

karelz commented Mar 30, 2018

Yes, we should treat it as finishing the SNI feature.

@karelz
Copy link
Member

karelz commented Mar 30, 2018

Thanks for offering help! Assigned to you.

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 2.1.0 milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants