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

Add support for X509_load_cert_file #1740

Merged
merged 1 commit into from Dec 3, 2022

Conversation

alexanderjordanbaker
Copy link

No description provided.

@alexanderjordanbaker alexanderjordanbaker force-pushed the X509LoadCertFile branch 2 times, most recently from 4f964e6 to 6b43fae Compare November 29, 2022 23:22
/// Marker type corresponding to the [`X509_LOOKUP_file`] lookup method.
///
/// [`X509_LOOKUP_file`]: https://www.openssl.org/docs/man1.1.1/man3/X509_LOOKUP_file.html
pub struct ASN1;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this called ASN1 and not e.g. File?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for pointing that out, that was a reference that I didn't replace with the appropriate name when creating the PR. I've updated the name to be File to match the HashDir struct above

impl X509LookupRef<File> {
#[corresponds(X509_load_cert_file)]
/// Specifies a file from which certificates will be loaded
pub fn load_cert_file(&mut self, file: &str, file_type: SslFiletype) -> Result<(), ErrorStack> {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type of file should be impl AsRef<Path> like here: https://docs.rs/openssl/latest/src/openssl/ssl/mod.rs.html#902-912

@sfackler
Copy link
Owner

sfackler commented Dec 3, 2022

LGTM other than the method signature!

@sfackler sfackler merged commit d299bbc into sfackler:master Dec 3, 2022
@sfackler
Copy link
Owner

sfackler commented Dec 3, 2022

Thanks!

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.

None yet

2 participants