-
Notifications
You must be signed in to change notification settings - Fork 317
Performance | Use lower-allocation AE primitives in SqlColumnEncryptionCertificateStoreProvider #3660
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
Performance | Use lower-allocation AE primitives in SqlColumnEncryptionCertificateStoreProvider #3660
Conversation
…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.
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/CoreCryptoTests.cs
Outdated
Show resolved
Hide resolved
...t.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlColumnEncryptionCertificateStoreProvider.cs
Show resolved
Hide resolved
...t.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlColumnEncryptionCertificateStoreProvider.cs
Outdated
Show resolved
Hide resolved
...t.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlColumnEncryptionCertificateStoreProvider.cs
Show resolved
Hide resolved
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Swap Debug.Assert to xUnit assertions. Add explanatory comment when parsing master key path. Remove redundant else.
paulmedynski
left a comment
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.
Looks great!
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/CoreCryptoTests.cs
Show resolved
Hide resolved
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
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
SqlColumnEncryptionCspProviderandSqlColumnEncryptionCngProvider. This one introduces them toSqlColumnEncryptionCertificateStoreProvider.While verifying this, I also noticed that the
TestRsaCryptoWithNativeBaselinetest 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.