Skip to content

Prepare cert tests for new signing algorithms#114416

Merged
bartonjs merged 3 commits intodotnet:mainfrom
bartonjs:certreq_prereqs
Apr 10, 2025
Merged

Prepare cert tests for new signing algorithms#114416
bartonjs merged 3 commits intodotnet:mainfrom
bartonjs:certreq_prereqs

Conversation

@bartonjs
Copy link
Member

@bartonjs bartonjs commented Apr 8, 2025

This is the test infrastructure half of #114357.

  • CertificateAuthority gains algorithm agility, varying across RSA and EC-DSA deterministically.
  • CertificateRequestChainTests stops using AsymmetricAlgorithm in advance of the new, non-AA types.
  • CertificateRequestLoadTests ensures that Load+Create yields the same as new+Create for all supported signature generator types.
  • PrivateKeyAssociationTests ensures the relationship of CopyWithPrivateKey, Get{Alg}PublicKey, Get{Alg}PrivateKey for all existing asymmetric algorithm types (even ECDH!)

@bartonjs bartonjs added area-System.Security test-enhancement Improvements of test source code labels Apr 8, 2025
@bartonjs bartonjs added this to the 10.0.0 milestone Apr 8, 2025
@bartonjs bartonjs self-assigned this Apr 8, 2025
Copilot AI review requested due to automatic review settings April 8, 2025 23:22
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

src/libraries/Common/tests/System/Security/Cryptography/X509Certificates/CertificateAuthority.cs:320

  • Verify that the delegated CloneWithPrivateKey method robustly supports all key types (RSA, ECDsa, and DSA) and correctly converts from the generalized key type to the expected concrete instance.
return Common.CertificateAuthority.CloneWithPrivateKey(cert, key);

@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-security, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.

@bartonjs bartonjs merged commit 00b0050 into dotnet:main Apr 10, 2025
84 of 86 checks passed
@bartonjs bartonjs deleted the certreq_prereqs branch April 10, 2025 01:54
@github-actions github-actions bot locked and limited conversation to collaborators May 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Security test-enhancement Improvements of test source code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants