-
Notifications
You must be signed in to change notification settings - Fork 305
Merge SqlColumnEncryptionCertificateStoreProvider #2521
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
Merge SqlColumnEncryptionCertificateStoreProvider #2521
Conversation
This also ports support for CNG keys from .NET to .NET Framework.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2521 +/- ##
==========================================
- Coverage 72.80% 72.66% -0.14%
==========================================
Files 311 310 -1
Lines 61709 61547 -162
==========================================
- Hits 44925 44724 -201
- Misses 16784 16823 +39
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thank you @edwardneal. This looks good as it is. Just a minor request, while you are working on this, is it possible to address the warnings on SqlColumnEncryptionCertificateStoreProvider.Windows class? Constant names have name rule violation and instead of |
Thanks @JRahnama. The coding style changes were small enough that they don't leave the diff looking unreadable; I've rolled them into this PR for simplicity's sake. |
@David-Engel @JRahnama I think this is OK to merge. CI is green, no merge conflicts. Changes look good. |
Contributes to #1261.
This sits alongside #2501, and ports the
SqlColumnEncryptionCertificateStoreProvider
class. Once again, this version uses the .NET approach ofSHA256.Create()
rather than the .NET Framework approach of constructing a newSHA256Cng
instance.I've separated this class from the other PR because of the slightly different implementation between .NET and .NET Framework. When the .NET Framework code performs encryption, generates signatures and validates signatures, it references the
PrivateKey
property and casts it to anRSACryptoServiceProvider
. The .NET code uses theGetRSAPrivateKey()
method and works with theRSA
base class instead. This means that the unmerged .NET Framework code can't use certificates with CNG keys; the post-merge implementation will be able to do so.