From https://datatracker.ietf.org/doc/html/rfc5652#section-5.6 (5.6. Signature Verification Process)
If the SignedData signerInfo includes signedAttributes, then the
content-type attribute value MUST match the SignedData
encapContentInfo eContentType value.
So, this is an RFC MUST that isn't being followed. Historically, we didn't verify it (explicitly... because of .NET Framework compat), but we've received complaints that we're missing this check, so we should add it.
|
// .NET Framework doesn't seem to validate the content type attribute, |
From https://datatracker.ietf.org/doc/html/rfc5652#section-5.6 (5.6. Signature Verification Process)
So, this is an RFC MUST that isn't being followed. Historically, we didn't verify it (explicitly... because of .NET Framework compat), but we've received complaints that we're missing this check, so we should add it.
runtime/src/libraries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/SignerInfo.cs
Line 634 in cdc5b62