Add CA certificate bundle path override for SSL issues#316
Add CA certificate bundle path override for SSL issues#316bananna-droid wants to merge 3 commits into
Conversation
Fix for linux for issue 146 Allows users to specify a custom CA certificate bundle path via ca_cert_config.txt configuration file. This addresses SSL certificate validation failures on Linux systems where libgit2's default certificate detection fails. Implementation uses git_libgit2_opts(GIT_OPT_SET_SSL_CERT_LOCATIONS) to set the certificate path at runtime. The feature is opt-in and should have zero impact on existing users.
|
I'm using Godot 4.6.1 on Windows 11 and am trying to fix this issue with the Git Plugin (Version 3.2.1) but I don't understand how to perform the changes listed in the above comment. |
|
This fork of the plugin can behave identically to the current public release if all the lines in the text file are commented out. The plugin reads the file top to bottom and stops at the first non-comment line it finds, so only uncomment one entry at a time. The file to edit is ca_cert_config.txt which is located in the folder of the plugin, just have an uncomment line with the full path to the file. It includes a couple of paths predefined but commented out.
If whatever reason there isn't any bundle in the git install, it can also work with the versions downloaded from https://curl.se/docs/caextract.html for ca-bundle.crt, just adjust the path to wherever you have the file at. |
Description
Adds support for custom CA certificate bundle path configuration to resolve SSL certificate validation failures.
Fixes
#146
Affected Platforms
This issue affects all platforms (Linux, Windows, macOS), not just Linux:
The plugin appears to be built with OpenSSL on all platforms, which fails to locate system CA certificates without proper configuration.
Testing
Changes
ca_bundle_pathmember andset_ca_bundle_path()method to GitPluginca_cert_config.txtgit_libgit2_opts(GIT_OPT_SET_SSL_CERT_LOCATIONS)for runtime certificate configurationTesting
Tested on Linux with custom CA bundle path. SSL operations (fetch/pull/push) now work correctly when config file is present.
Behavior
Example Config File
# ca_cert_config.txt /etc/ssl/certs/ca-certificates.crtRationale
While ideally libgit2 would auto-detect certificate locations on all systems, this provides users immediate control in environments where auto-detection fails. This follows the same pattern as curl's
--cacertand git'shttp.sslCAInfooptions.