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

[QUIC] Cleaned up TlsSecret and added test. #93119

Merged
merged 5 commits into from
Oct 12, 2023

Conversation

ManickaP
Copy link
Member

@ManickaP ManickaP commented Oct 6, 2023

Added test for SSLKEYLOGFILE, fixed missing writing of the secret and removed direct reference from safe handle (now held by IDisposable).

@ghost
Copy link

ghost commented Oct 6, 2023

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

Issue Details

Added test for SSLKEYLOGFILE, fixed missing writing of the secret and removed direct reference from safe handle (now held by IDisposable).

Author: ManickaP
Assignees: ManickaP
Labels:

area-System.Net

Milestone: -

@ghost
Copy link

ghost commented Oct 6, 2023

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

Issue Details

Added test for SSLKEYLOGFILE, fixed missing writing of the secret and removed direct reference from safe handle (now held by IDisposable).

Author: ManickaP
Assignees: ManickaP
Labels:

area-System.Net.Quic

Milestone: -

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

{
NativeMemory.Clear(_tlsSecrets, (nuint)sizeof(QUIC_TLS_SECRETS));
NativeMemory.Free(_tlsSecrets);
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure this is safe. It feels like we can free the memory while MsQuic still may be trying to write to that. That was one reason why originally the native memory was tight to the MsQuic handle lifecycle.

Copy link
Member Author

Choose a reason for hiding this comment

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

The dispose is called when the connection handle gets released, not from QuicConnection.DisposeAsync.

@ManickaP ManickaP force-pushed the mapichov/quic-safe-handle branch 2 times, most recently from c131283 to 58851d5 Compare October 11, 2023 10:44
@ManickaP ManickaP merged commit dae5947 into dotnet:main Oct 12, 2023
109 checks passed
@ManickaP ManickaP deleted the mapichov/quic-safe-handle branch October 12, 2023 11:29
@ghost ghost locked as resolved and limited conversation to collaborators Nov 11, 2023
@karelz karelz added this to the 9.0.0 milestone May 14, 2024
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.

5 participants