Repository navigation
Probe for EC explicit curve support when SymCrypt is present - #138026
Merged
Merged
Conversation
|
Azure Pipelines: Successfully started running 3 pipeline(s). 12 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @bartonjs, @vcsjones, @dotnet/area-system-security |
bartonjs
approved these changes
Nov 20, 2026
This was referenced Nov 21, 2026
lewing
added a commit
that referenced
this pull request
Nov 24, 2026
…resent (#138078) Fixes Issue <!-- Issue Number --> N/A (test-only correction); contributes to #137121. main PR <!-- Link to PR if any that fixed this in the main branch. --> #138026 # Description <!-- Give a brief summary of the issue and how the pull request is fixing it. --> Backports e8e8e31 without adaptation. SymCrypt being installed does not mean OpenSSL selects it for EC operations. Probe explicit P-256 key import when SymCrypt is present and share the cached capability result across ECDsa/ECDH test providers. Changes are limited to three existing test files; no product code changes. # Customer Impact <!-- What is the impact to customers of not taking this fix? --> No direct customer/product impact. Without this correction, cryptography tests can incorrectly classify explicit-curve support on Azure Linux hosts and containers, skipping supported coverage or selecting incorrect expectations. # Regression <!-- Is this fixing a problem that was introduced in the most recent release, ie., fixing a regression? --> Test capability-detection bug present on release/11.0. This is not a product regression fix; the introduction release was not established. # Testing <!-- What kind of testing has been done with the fix. --> `git diff --check` and `git show --format= --check HEAD`: passed. Stable patch ID and all three resulting files match the source commit. `dotnet build src/libraries/System.Security.Cryptography/tests/System.Security.Cryptography.Tests.csproj -p:TargetOS=linux -p:TargetArchitecture=arm64`: failed (exit 1) because the local shared framework/targeting pack prerequisite is missing; compilation was not verified. No full clr+libs baseline, test execution, daily-build validation, or SymCrypt/OpenSSL runtime validation was run locally. PR CI is required for build and affected test verification. # Risk <!-- Please assess the risk of taking this fix. Provide details backing up your assessment. --> Low product risk: test-only, exact upstream port, no shipping code or public API changes. The cached probe imports a public explicit P-256 key only when SymCrypt is detected; expected unsupported-import exceptions yield false. Apple-platform exclusions are preserved. Residual risk is limited to test capability classification and requires CI verification. # Package authoring no longer needed in .NET 9 IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version. Keep in mind that we still need package authoring in .NET 8 and older versions. > [!NOTE] > This PR description was generated by GitHub Copilot. Co-authored-by: Copilot App <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Azure Linux has no precise way for us to understand what way the system is currently configured. The presence of the symcryptopenssl provider does not necessarily mean it is the default provider. Different Azure Linux 4 hosts appear to have different defaults. In container environments it is not the default provider, whereas in some virtual machine configurations, it is.
This impacts our tests because we don't know whether or not the system currently supports explicit curves.
The OpenSSL-y way to figure out what is going to happen is to ask the KEYMGMT APIs what provider is going to answer the call when we say "Please import this EC key". But we don't have that exposed anywhere usefully for tests to consume.
This pull request updates our tests so that explicit curve support is probed if we detect that SCOSSL is present on the system.
Contributes to #137121