-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[release/7.0] Fix SignedCms certificate collection modification with attribute certificates #80188
Conversation
…ificates. When adding or removing certificates from the certificateSet collection, we assumed that the collection would only contain X.509 certificates. This changes the implementation so that when looking for duplicates, we skip over choices that are not an X.509 certificate when looking for a duplicate. The tests peek in to the SignedData ASN.1 to ensure that the attribute certificates are preserved during a round trip when encoding and decoding a CMS.
Tagging subscribers to this area: @dotnet/area-system-security, @vcsjones Issue DetailsBackport of #79940 to release/7.0 /cc @vcsjones Customer ImpactTestingRiskIMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.
|
This comment was marked as outdated.
This comment was marked as outdated.
@bartonjs when this is ready, please add the |
Approved by Tactics (7.0.3). |
Backport of #79940 and #80195 to release/7.0
/cc @vcsjones
Customer Impact
Reported by a partner for
dotnet/sign
at #79935. When usingSignedCms
with a CMS that contains an attribute certificate, such as an RFC3161 timestamp issued by Azure Codesigning, theAddCertificate
andRemoveCertificate
APIs would raise an exception when adding or removing an X.509 certificate because they did not know how to process the attribute certificate. The impact of this is that these two APIs cannot function in the presence of an attribute certificate.Testing
This introduces tests to validate behavior of a CMS that contains attribute certificates to prevent regressions.
Risk
Low. The changes are isolated and well understood.
IMPORTANT: Is this backport for a servicing release? Yes.