File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -195,6 +195,28 @@ pub unsafe fn set_verify_owner_validation(enabled: bool) -> Result<(), Error> {
195
195
Ok ( ( ) )
196
196
}
197
197
198
+ /// Set the SSL certificate-authority locations. `file` is the location of a file containing
199
+ /// several certificates concatenated together. `path` is the location of a directory holding
200
+ /// several certificates, one per file. Either parameter may be `None`, but not both.
201
+ pub unsafe fn set_ssl_cert_locations < P > ( file : Option < P > , path : Option < P > ) -> Result < ( ) , Error >
202
+ where
203
+ P : IntoCString ,
204
+ {
205
+ crate :: init ( ) ;
206
+ let file = crate :: opt_cstr ( file) ?;
207
+ let path = crate :: opt_cstr ( path) ?;
208
+
209
+ unsafe {
210
+ try_call ! ( raw:: git_libgit2_opts(
211
+ raw:: GIT_OPT_SET_SSL_CERT_LOCATIONS as libc:: c_int,
212
+ file,
213
+ path
214
+ ) ) ;
215
+ }
216
+
217
+ Ok ( ( ) )
218
+ }
219
+
198
220
#[ cfg( test) ]
199
221
mod test {
200
222
use super :: * ;
You can’t perform that action at this time.
0 commit comments