-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add UnmanagedCallersOnly attribute to SafeDeleteSslContext.ReadFromConnection/WriteToConnection methods #55947
Add UnmanagedCallersOnly attribute to SafeDeleteSslContext.ReadFromConnection/WriteToConnection methods #55947
Conversation
…nnection/WriteToConnection methods
Tagging subscribers to this area: @dotnet/ncl, @vcsjones Issue DetailsIt doesn't work yet and needs any feedback about the correctness of approach.
|
I'm not very familiar, but based on what @lambdageek mentioned #55736 (comment), UnmanagedCallersOnlyAttribute the changes seem like the right path. Are Perhaps once |
src/libraries/Common/src/Interop/OSX/System.Security.Cryptography.Native.Apple/Interop.Ssl.cs
Outdated
Show resolved
Hide resolved
You will need to have some way to go from the call arguments back to the object. Do these APIs have a way to pass pointer to user data around? If not, you will need to pass the extra data around using some sort of global state, e.g. Dictionary that uses connection pointer as the key. |
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
…ipnin/runtime into add_pinvoke_callback_attr
In theory that runtime/src/libraries/System.Net.Security/src/System/Net/Security/Pal.OSX/SafeDeleteSslContext.cs Lines 44 to 47 in 4a4f6c0
We could probably just put a GCHandle to |
…SslContext instance is associated to an ssl session
@MaximLipnin I put up a commit that should help. Please validate. Thanks for the tips everyone. |
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.
Nice!
@MaximLipnin You might want to merge w/ main b/c it'll resolve a bunch of test failures on iOS. |
Fixes #55736