diff options
author | Werner Koch <[email protected]> | 2013-10-04 06:28:12 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2013-10-04 18:47:48 +0000 |
commit | 69088ac76fd4b9f303edf3c1453088dda8596399 (patch) | |
tree | bfe0d3d1bb3b9e62d71b9072d904d28749d14df7 | |
parent | gpg: Limit the nesting level of I/O filters. (diff) | |
download | gnupg-69088ac76fd4b9f303edf3c1453088dda8596399.tar.gz gnupg-69088ac76fd4b9f303edf3c1453088dda8596399.zip |
keyserver: Allow use of cURL's default CA store.
* keyserver/gpgkeys_curl.c (main): Set CURLOPT_CAINFO only if a file
has been given.
* keyserver/gpgkeys_hkp.c (main): Ditto.
--
GnuPG-bug-id: 1542
Signed-off-by: Werner Koch <[email protected]>
(cherry picked from commit e957b9b3f408491f36660499b215aebcf2633a95)
-rw-r--r-- | keyserver/gpgkeys_curl.c | 5 | ||||
-rw-r--r-- | keyserver/gpgkeys_hkp.c | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/keyserver/gpgkeys_curl.c b/keyserver/gpgkeys_curl.c index 5853f2c6a..55aee68d6 100644 --- a/keyserver/gpgkeys_curl.c +++ b/keyserver/gpgkeys_curl.c @@ -100,7 +100,7 @@ get_key(char *getkey) return curl_err_to_gpg_err(res); } -static void +static void show_help (FILE *fp) { fprintf (fp,"-h, --help\thelp\n"); @@ -305,7 +305,8 @@ main(int argc,char *argv[]) } curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,(long)opt->flags.check_cert); - curl_easy_setopt(curl,CURLOPT_CAINFO,opt->ca_cert_file); + if (opt->ca_cert_file) + curl_easy_setopt (curl, CURLOPT_CAINFO, opt->ca_cert_file); /* Avoid caches to get the most recent copy of the key. This is bug #1061. In pre-curl versions of the code, we didn't do it. Then diff --git a/keyserver/gpgkeys_hkp.c b/keyserver/gpgkeys_hkp.c index 309e728c2..f45958e18 100644 --- a/keyserver/gpgkeys_hkp.c +++ b/keyserver/gpgkeys_hkp.c @@ -921,7 +921,8 @@ main(int argc,char *argv[]) curl_easy_setopt(curl,CURLOPT_USERPWD,opt->auth); curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,(long)opt->flags.check_cert); - curl_easy_setopt(curl,CURLOPT_CAINFO,opt->ca_cert_file); + if (opt->ca_cert_file) + curl_easy_setopt (curl, CURLOPT_CAINFO, opt->ca_cert_file); /* Avoid caches to get the most recent copy of the key. This is bug #1061. In pre-curl versions of the code, we didn't do it. Then |