Skip to content

Conversation

@edwardneal
Copy link
Contributor

Description

This is my final PR in this set of changes to this area, picking up where #3612 left off. Benchmarks for this PR are located in #3554.

The previous PR used the AlwaysEncrypted primitives in SqlColumnEncryptionCspProvider and SqlColumnEncryptionCngProvider. This one introduces them to SqlColumnEncryptionCertificateStoreProvider.

While verifying this, I also noticed that the TestRsaCryptoWithNativeBaseline test was calling private methods using reflection, but that there was a TODO item in the test to use the public API surface instead. I've done this.

Issues

PR 1/3: #3554.
PR 2/3: #3612.
PR 3/3: this one.

Testing

As in the previous PR, automated tests pass. I also created an AE-enabled table in SSMS which used a certificate store-based master key and confirmed that I was able to query it and insert records into it.

…ypair

Also remove an indentation level and dispose of the intermediary X509Certificate2.
This changes some of the test behaviour: previously, it was calling RSADecrypt and RSAVerifySignature directly. Since these methods no longer exist, we follow the public API (which also calls these methods' equivalent functionality.)
This also addresses a TODO: in the test code.
Also ensure that the ref structs implement IDisposable.
@edwardneal edwardneal requested a review from a team as a code owner October 4, 2025 18:52
@paulmedynski
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@paulmedynski paulmedynski self-assigned this Oct 6, 2025
Swap Debug.Assert to xUnit assertions.
Add explanatory comment when parsing master key path.
Remove redundant else.
Copy link
Contributor

@paulmedynski paulmedynski left a comment

Choose a reason for hiding this comment

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

Looks great!

@paulmedynski
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@codecov
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (3867bbb) to head (507d420).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #3660       +/-   ##
==========================================
- Coverage   77.23%       0   -77.24%     
==========================================
  Files         271       0      -271     
  Lines       45245       0    -45245     
==========================================
- Hits        34944       0    -34944     
+ Misses      10301       0    -10301     
Flag Coverage Δ
addons ?
netcore ?
netfx ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cheenamalhotra cheenamalhotra added this to the 7.0.0-preview3 milestone Oct 17, 2025
@mdaigle
Copy link
Contributor

mdaigle commented Oct 17, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@paulmedynski paulmedynski merged commit 37a9c99 into dotnet:main Oct 20, 2025
236 checks passed
@edwardneal edwardneal deleted the perf/ae-primitives/certificate-store-provider branch October 20, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants