-
-
Notifications
You must be signed in to change notification settings - Fork 775
Add some additional CMS methods #1034
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
Conversation
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.
Please add some tests using the new functionality.
use x509::{X509Ref, X509}; | ||
use {cvt, cvt_n, cvt_p}; | ||
|
||
pub struct CmsSignerInfoRef(Opaque); |
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.
You should be able to use the macro to create these.
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.
Sorry, but I'm unable to figure out the correct macro for this.
openssl/src/cms.rs
Outdated
} | ||
|
||
impl CmsSignerInfo { | ||
pub fn add_attr(&mut self, obj: &Asn1Object, data_type: i32, data: &[u8]) -> i32 { |
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.
This should probably return a result.
Is data_type an arbitrary integer or actually an enum?
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.
I can't find any documentation for it, but it seems to be an opaque integer.
@sfackler: Tried to resolve most issues, working on tests now. |
Have you had a chance to add those tests? |
I need to use the APIs cited in https://stackoverflow.com/questions/55654448/using-openssl-api-how-can-i-access-a-signers-certificate-info-from-a-signed-fil, which include some of the APIs in this PR and a few more. @sfackler would you be open to an alternative PR that uses this work and bridges the additional APIs? |
What's the status of this PR? |
This adds the following methods:
Documentation is still pending and should be addressed in the next commit, but I'd be grateful for a code review.