Permalink
Browse files

Respect ZSYNC_CA_BUNDLE environment variable as an alternative to the…

… -C option. But, if -C is provided, ignore the environment variable.
  • Loading branch information...
1 parent cbfe9f7 commit 4bd63070abe2abc47c31ab50cb9c69a17064f3de merlino committed with Jan 6, 2011
Showing with 8 additions and 0 deletions.
  1. +8 −0 c/client.c
View
@@ -514,6 +514,14 @@ int main(int argc, char **argv) {
if (!isatty(0))
no_progress = 1;
+ /* Respect ZSYNC_CA_BUNDLE environment variable */
+ if( !cacert ) {
+ char *env_cacert;
+ if( env_cacert = getenv("ZSYNC_CA_BUNDLE") ) {
+ cacert = strdup(env_cacert);
+ }
+ }
+
/* Global libcurl init -- must be called exactly once per program */
if( curl_global_init( CURL_GLOBAL_ALL ) ) {
/* libcurl is busted */

0 comments on commit 4bd6307

Please sign in to comment.