-
Notifications
You must be signed in to change notification settings - Fork 3
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
Specs for multiple PCKS7 signatures #26
Comments
See clearhaus/pedicel-pay#7 for the adjustment of |
I think the The case that we want to catch, is if a non Apple-signed signature is added, we don't want to accidentally use that and accept that as a valid signature. |
It's renamed to IRL discussion:
Well, not necessarily, since one PKCS7 signature can have multiple signers (cf. https://tools.ietf.org/html/rfc5652#section-5.1). We could even read it as
but we've decided that we accept it only when there's exactly one signer. And since we do this, we could move the check earlier and fail slightly less weird. This piece of code should be hit by a test no matter what. |
A pull request related to this is #27. |
Agreed. However, we still miss a test to hit the code that makes pedicel err when multiple signers is present in the signature. |
By adjusting
PedicelPay::Backend#sign
to err if thetoken
already has asignature
, I notice that only 4 specs fail, namelyBut by removing the
if token.signature
section completely makes the specs succeed. Thus, it seems it's not used anywhere thatpedicel-pay
support adding to the PKCS7 signature.I think we should test this. However, I also think the default behaviour in
PedicelPay::Backend#sign
should be to overwrite the signature; there could be aoverwrite: true
default flag.@kse-clearhaus WDYT?
The text was updated successfully, but these errors were encountered: