1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

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 <wk@gnupg.org>
This commit is contained in:
Werner Koch 2013-10-04 08:28:12 +02:00
parent 35e40e2d51
commit e957b9b3f4
2 changed files with 5 additions and 3 deletions

View File

@ -99,7 +99,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");
@ -304,7 +304,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

View File

@ -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