Closed aharbis closed 11 months ago
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?
@ehuss Good idea, I've updated the PR with the proposed change.
Adds a binding for
git_libgit2_opts
keyGIT_OPT_SET_SSL_CERT_LOCATIONS
inopts
module.https://github.com/rust-lang/git2-rs/issues/995