-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Detect presence of OpenSSL for crypto primitives #52648
Conversation
Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @GrabYourPitchforks Issue DetailsThis exposes a property that determines if OpenSSL can be loaded by attempting to I was able to run tests in S.S.Cryptography.Algorithms.Tests locally with no OpenSSL present on the system without hitting a sigabrt. Closes #52598
|
...ries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSslAvailable.cs
Show resolved
Hide resolved
…openssl.c Co-authored-by: Filip Navara <[email protected]>
...ries/Common/src/Interop/Unix/System.Security.Cryptography.Native/Interop.OpenSslAvailable.cs
Outdated
Show resolved
Hide resolved
...ries/System.Security.Cryptography.Algorithms/src/System/Security/Cryptography/AesCcm.Unix.cs
Show resolved
Hide resolved
740fc76
to
7e3ae65
Compare
Sorry for the force push. None of the force-pushed changes had code differences. Needed to fix my authorship of the commit. |
@@ -678,6 +678,17 @@ public static IEnumerable<object[]> GetNistCcmTestCasesWithNonEmptyPT() | |||
|
|||
public class AesCcmIsSupportedTests | |||
{ | |||
public static bool RuntimeSaysIsNotSupported => !AesCcm.IsSupported; | |||
|
|||
[ConditionalFact(nameof(RuntimeSaysIsNotSupported))] |
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.
I don't know if these tests will get exercised during CI or not, but I confirmed they work locally without openssl.
Don't try to call in to OpenSSL shim on browser.
I'm fairly sure the failing legs are unrelated from the changes. The failing Browser legs passed in the penultimate commit, and the last commit was just a merge commit. The macOS failure also seems unrelated and appears to have been flaky in the past. |
This exposes a property that determines if OpenSSL can be loaded by attempting to
dlopen
it using the existing routines that respect environment variable overrides, etc. The result of this is cached in aLazy<bool>
.I was able to run tests in S.S.Cryptography.Algorithms.Tests locally with no OpenSSL present on the system without hitting a sigabrt.
Closes #52598