-
-
Notifications
You must be signed in to change notification settings - Fork 758
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
Added pkcs7 support (this PR was split, do not merge) #1598
base: master
Are you sure you want to change the base?
Conversation
This commit adds support for querying most fields from the SignerInfo structures contained within a PKCS7 signature: * Subject name of signer * Serial number of signer * Digest algorithm * Digest encryption algorithm * Raw signature Signed-off-by: Andrew Gunnerson <chillermillerlong@hotmail.com>
Hi, this PR is very large so reviewing and merging it will take a pretty large time commitment from one of us. I may be able to look at it at some point but I can't make any promises. Also, it's marked as a draft and has some git conflict markers in it, which makes me very hesitant to review. Is this ready (barring the merge conflicts)? |
The only reason for the Draft marker is a race condition in OpenSSL, which is encountered by a test ( |
Splitting it up into smaller PRs would be helpful. Obviously investigating that flaky test would be useful, but don't feel obligated. |
…o kletterstein/pkcs7
@Skepfyr I will try to split the PR, but I'm not sure, if I will be able to detangle this without dropping something. My plan is to make 4 PRs:
|
That sounds reasonable. It's probably sensible to leave this PR up so that we can check it's all there once everything's merged. |
@Skepfyr I completed the split. I think it's best to review the PR's in order:
|
This branch extends the wrapper mainly for PKCS7 applications. I use it for:
As this is my first contribution to rust-openssl, I'd appreciate a reviewer's opinion for this:
PKCS7
struct should be opaque, but I had to expose the inner structure of openssl'sPKCS7
to the wrapper. There is no other way to get access to the certificates in a PKCS7. openssl's api misses something likePKCS7_get0_certificates()
. All I found was the implementation ofopenssl pkcs -in p7.pem -print-certs
, which also reads the inner fields:certs = p7->d.sign->cert;