@@ -529,18 +529,15 @@ function set_ssl_cert_locations(cert_loc)
529
529
cert_file = isfile (cert_loc) ? cert_loc : Cstring (C_NULL )
530
530
cert_dir = isdir (cert_loc) ? cert_loc : Cstring (C_NULL )
531
531
cert_file == C_NULL && cert_dir == C_NULL && return
532
- ccall ((:git_libgit2_opts , :libgit2 ), Cint,
533
- (Cint, Cstring, Cstring),
534
- Cint (Consts. SET_SSL_CERT_LOCATIONS), cert_file, cert_dir)
532
+ # TODO FIX https://github.com/libgit2/libgit2/pull/3935#issuecomment-253910017
533
+ # ccall((:git_libgit2_opts, :libgit2), Cint,
534
+ # (Cint, Cstring, Cstring),
535
+ # Cint(Consts.SET_SSL_CERT_LOCATIONS), cert_file, cert_dir)
536
+ ENV [" SSL_CERT_FILE" ] = cert_file
537
+ ENV [" SSL_CERT_DIR" ] = cert_dir
535
538
end
536
539
537
540
function __init__ ()
538
- err = ccall ((:git_libgit2_init , :libgit2 ), Cint, ())
539
- err > 0 || throw (ErrorException (" error initializing LibGit2 module" ))
540
- atexit () do
541
- ccall ((:git_libgit2_shutdown , :libgit2 ), Cint, ())
542
- end
543
-
544
541
# Look for OpenSSL env variable for CA bundle (linux only)
545
542
# windows and macOS use the OS native security backends
546
543
@static if is_linux ()
@@ -554,6 +551,12 @@ function __init__()
554
551
end
555
552
set_ssl_cert_locations (cert_loc)
556
553
end
554
+
555
+ err = ccall ((:git_libgit2_init , :libgit2 ), Cint, ())
556
+ err > 0 || throw (ErrorException (" error initializing LibGit2 module" ))
557
+ atexit () do
558
+ ccall ((:git_libgit2_shutdown , :libgit2 ), Cint, ())
559
+ end
557
560
end
558
561
559
562
0 commit comments