KEMBAR78
avoid allocation of SelectClientCertificate delegate by wfurt · Pull Request #81096 · dotnet/runtime · GitHub
Skip to content

Conversation

@wfurt
Copy link
Member

@wfurt wfurt commented Jan 24, 2023

This change takes certificate selection from PAL and moves it back to main SslStream. Since we need (at the moment) some state information we pass the instance delegate. The logic is wrapped into new PAL method that can indicate that the update was successful (macOS & Linux) or if new credentials are needed (Windows)

I also removed some logic from SelectClientCertificate() as it should not need to worry about the handshake state. The _credentialsHandle can be `null on Unix so the logic seems suspicious anyway. Instead, the information is passed to 'AcquireClientCredentials' based on returned status code.

contributes to #68951

Testing: the select
SelectClientCertificate no longe shows in allocation list

image

@wfurt wfurt added this to the 8.0.0 milestone Jan 24, 2023
@wfurt wfurt requested a review from rzikm January 24, 2023 16:28
@wfurt wfurt self-assigned this Jan 24, 2023
@ghost
Copy link

ghost commented Jan 24, 2023

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

Issue Details

This change takes certificate selection from PAL and moves it back to main SslStream. Since we need (at the moment) some state information we pass the instance delegate. The logic is wrapped into new PAL method that can indicate that the update was successful (macOS & Linux) or if new credentials are needed (Windows)

I also removed some logic from SelectClientCertificate() as it should not need to worry about the handshake state. The _credentialsHandle can be `null on Unix so the logic seems suspicious anyway. Instead, the information is passed to 'AcquireClientCredentials' based on returned status code.

contributes to #68951

Testing: the select
SelectClientCertificate no longe shows in allocation list

image

Author: wfurt
Assignees: wfurt
Labels:

area-System.Net.Security

Milestone: 8.0.0

Copy link
Member

@rzikm rzikm left a comment

Choose a reason for hiding this comment

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

LGTM!

@wfurt wfurt merged commit c156b64 into dotnet:main Jan 25, 2023
@wfurt wfurt deleted the delegate branch January 25, 2023 23:59
@ghost ghost locked as resolved and limited conversation to collaborators Feb 25, 2023
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.

2 participants