Skip to content
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

Make message decoding more interoperable for signature verification #309

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aloopkin
Copy link
Contributor

Ensure that the encoding used for the signed attributes is the one specified in the original message

Reason behind that:

  • some SCEP clients do not fully comply with RFC 5652, and e.g. encode the signed attributes in BER or other attributes ordering issues
  • BC by defaults rebuilds the signed attributes before verification using ASN1Encoding.DER
    As a result, verification fails because the hash of the signed attributes does not match the signature, since the signed attributes have been rebuilt.
    More information there: PKCS#7 / CMS Signature validation failure with unordered attributes bcgit/bc-java#1365

The current PR allows to retrieve the "raw" signed attributes, coming from the request, instead of rebuilding them for signature verification.

ensure that the encoding used for the signed attributes is the one specified in the original message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant