-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PKCS7SignatureBuilder now supports new option NoCerts when signing #5500
Conversation
@reaperhulk I only now saw #5498 and the way you are checking for the presence/amount of the certs:
Should I change this PR to use the same method or is my approach acceptable too? UPDATE: I have changed it. |
b4276fa
to
d457764
Compare
d457764
to
d47add4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strictly speaking, this is something that can vary on a per-signer basis. Should this flag be passed to add_signer
?
Correct.
I would leave it up to you to decide this. It's the same approach with As #5498 is now merged it would still be possible to e.g. set the |
@frennkie we're definitely interested in your opinion on Alex's question. As you no doubt know, since you followed the current implementation exactly, we treat a few per-signer flags as globals right now. We can continue to do this or we can expose it per-signer instead. My personal inclination is to leave this global and add a per-signer form later if we get requests for it. This form would then be the shorthand for "add the flag to all signers". |
Haha, I see we replied simultaneously. Definitely curious if you see a use case right now for it to be per-signer though. |
I absolutely see no use case for per-signer! The reason for this is that my (currently only) use for this is the sending of S/MIME e-mails. And in this scenario I don't see how/why two different signers would sign the same message. This would be different for e.g. subsequently signing a PDF document by (several) different people. As outlined above.. the current API covers the "normal use case" by default - and still leaves room for special/edge cases. |
Good enough for me! Thanks for working on this @frennkie |
This adds the possibility to add the
PKCS7_NOCERTS
flag/option (as per PKCS7_sign_add_signer) in order to exclude the signer's certificate.