Make libcurl respect the SSL_CERT_{DIR,FILE} variables by default. The variables
are fetched during initialization to preserve thread-safety (curl_global_init(3)
must be called when no other threads exist).
This fixes network functionality in rust:cargo, and probably removes the need
for other future workarounds.
===================================================================
--- curl-8.5.0.orig/lib/easy.c 2023-12-17 00:36:32.400468561 -0500
+++ curl-8.5.0/lib/easy.c 2023-12-17 00:39:08.898612331 -0500
@@ -137,6 +137,9 @@
static char *leakpointer;
#endif
+char * Curl_ssl_cert_dir = NULL;
+char * Curl_ssl_cert_file = NULL;
+
/**
* curl_global_init() globally initializes curl given a bitwise set of the
* different features of what to initialize.
@@ -163,6 +166,9 @@
goto fail;
}
+ Curl_ssl_cert_dir = curl_getenv("SSL_CERT_DIR");
+ Curl_ssl_cert_file = curl_getenv("SSL_CERT_FILE");
+
if(!Curl_ssl_init()) {
DEBUGF(fprintf(stderr, "Error: Curl_ssl_init failed\n"));
goto fail;
@@ -287,6 +293,9 @@
Curl_ssl_cleanup();
Curl_resolver_global_cleanup();
+ free(Curl_ssl_cert_dir);
+ free(Curl_ssl_cert_file);
+
#ifdef _WIN32
Curl_win32_cleanup(easy_init_flags);
#endif
diff -ur curl-7.66.0.orig/lib/url.c curl-7.66.0/lib/url.c
--- curl-7.66.0.orig/lib/url.c 2020-01-02 15:43:11.883921171 +0100
+++ curl-7.66.0/lib/url.c 2020-01-02 16:21:11.563880346 +0100
@@ -524,6 +524,21 @@
if(result)
return result;
#endif
+ extern char * Curl_ssl_cert_dir;
+ extern char * Curl_ssl_cert_file;
+ if(Curl_ssl_cert_dir) {
+ if(result = Curl_setstropt(&set->str[STRING_SSL_CAPATH], Curl_ssl_cert_dir))
+ return result;
+ if(result = Curl_setstropt(&set->str[STRING_SSL_CAPATH_PROXY], Curl_ssl_cert_dir))
+ return result;
+ }
+
+ if(Curl_ssl_cert_file) {
+ if(result = Curl_setstropt(&set->str[STRING_SSL_CAFILE], Curl_ssl_cert_file))
+ return result;
+ if(result = Curl_setstropt(&set->str[STRING_SSL_CAFILE_PROXY], Curl_ssl_cert_file))
+ return result;
+ }
}
set->wildcard_enabled = FALSE;
href='/guix/log/gnu/machine.scm?id=f9755ff2ac545bf90f50e64b6e70787b9b508427'>machine.scm
Age | Commit message (Expand) | Author |
2022-02-08 | gnu: Fix typo....* gnu/machine.scm: Fix typo in top-level comment.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| jgart |
2020-07-25 | utils: Move <location> and '&error-location' to (guix diagnostics)....* guix/utils.scm (<location>, source-properties->location)
(location->source-properties, &error-location): Move to...
* guix/diagnostics.scm: ... here.
* gnu.scm: Adjust imports accordingly.
* gnu/machine.scm: Likewise.
* gnu/system.scm: Likewise.
* gnu/tests.scm: Likewise.
* guix/inferior.scm: Likewise.
* tests/channels.scm: Likewise.
* tests/packages.scm: Likewise.
| Ludovic Courtès |
2020-02-09 | Update e-mail address for Jakob L. Kreuze....As requested here:
<https://lists.gnu.org/archive/html/guix-devel/2020-02/msg00128.html>.
* .mailmap: Add an entry for Jakob.
* gnu/machine.scm, gnu/machine/digital-ocean.scm, gnu/machine/ssh.scm,
gnu/packages/admin.scm, gnu/packages/i2p.scm, gnu/packages/music.scm,
gnu/packages/web.scm, gnu/tests/reconfigure.scm, guix/scripts/deploy.scm,
guix/scripts/system/reconfigure.scm: Update their e-mail address.
| Tobias Geerinckx-Rice |
2019-12-08 | machine: Remove unnecessary record self-referencing bindings....'this-machine' and 'this-machine-ssh-configuration' were useless given
that there are no thunked fields.
* gnu/machine.scm (<machine>)[this-machine]: Remove.
* gnu/machine/ssh.scm (<machine-ssh-configuration>)
[this-machine-ssh-configuration]: Remove.
| Ludovic Courtès |
2019-12-07 | machine: Add provenance tracking to each machine operating system....* gnu/machine.scm (<machine>): Rename accessor to
'%machine-operating-system'.
(machine-operating-system): New procedure.
* doc/guix.texi (Service Reference): Mention it.
| Ludovic Courtès |
2019-08-15 | machine: Implement 'roll-back-machine'....* gnu/machine.scm (roll-back-machine, &deploy-error, deploy-error?)
(deploy-error-should-roll-back)
(deploy-error-captured-args): New variable.
* gnu/machine/ssh.scm (roll-back-managed-host): New variable.
* guix/scripts/deploy.scm (guix-deploy): Roll-back systems when a
deployment fails.
| Jakob L. Kreuze |
2019-08-06 | machine: Rename 'system' field....* gnu/machine.scm (machine-system): Delete variable.
(machine-operating-system): New variable.
All callers changed.
* doc/guix.texi (Invoking guix deploy): Use the
'machine-operating-system' accessor rather than 'machine-system'.
| Jakob L. Kreuze |
2019-07-06 | gnu: Add machine type for deployment specifications....* gnu/machine.scm: New file.
* gnu/machine/ssh.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
| Jakob L. Kreuze |