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 binding for GIT_OPT_SET_SSL_CERT_LOCATIONS #997

Merged
merged 2 commits into from
Nov 3, 2023

Conversation

aharbis
Copy link
Contributor

@aharbis aharbis commented Oct 31, 2023

Adds a binding for git_libgit2_opts key GIT_OPT_SET_SSL_CERT_LOCATIONS in opts module.

#995

@ehuss
Copy link
Contributor

ehuss commented Nov 3, 2023

Thanks! I was wondering, instead of surfacing the kinda weird low-level API (which looks to be inherited from OpenSSL's SSL_CTX_load_verify_locations) if it could have something that is a little more explicit that doesn't require the use of Option. Perhaps something like separate functions:

pub unsafe fn set_ssl_cert_file<P: IntoCString>(file: P) -> Result<(), Error>
pub unsafe fn set_ssl_cert_dir<P: IntoCString>(path: P) -> Result<(), Error>

That way it is a little clearer and more deliberate as to what the caller is doing. WDYT?

@aharbis
Copy link
Contributor Author

aharbis commented Nov 3, 2023

@ehuss Good idea, I've updated the PR with the proposed change.

Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

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

Thanks!

@ehuss ehuss added this pull request to the merge queue Nov 3, 2023
Merged via the queue into rust-lang:master with commit fd4d7c7 Nov 3, 2023
7 checks passed
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.

2 participants