mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
* gpgkeys_curl.c (main), gpgkeys_hkp.c (main): Make sure all libcurl
number options are passed as long. * curl-shim.c (curl_easy_setopt): Minor tweak to match the real curl better - libcurl uses 'long', not 'unsigned int'.
This commit is contained in:
parent
97ec9aac2b
commit
c15eb48603
@ -1,3 +1,11 @@
|
|||||||
|
2008-04-14 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* gpgkeys_curl.c (main), gpgkeys_hkp.c (main): Make sure all
|
||||||
|
libcurl number options are passed as long.
|
||||||
|
|
||||||
|
* curl-shim.c (curl_easy_setopt): Minor tweak to match the real
|
||||||
|
curl better - libcurl uses 'long', not 'unsigned int'.
|
||||||
|
|
||||||
2008-04-07 Werner Koch <wk@g10code.com>
|
2008-04-07 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* gpgkeys_kdns.c: New.
|
* gpgkeys_kdns.c: New.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* curl-shim.c - Implement a small subset of the curl API in terms of
|
/* curl-shim.c - Implement a small subset of the curl API in terms of
|
||||||
* the iobuf HTTP API
|
* the iobuf HTTP API
|
||||||
*
|
*
|
||||||
* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
* Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of GnuPG.
|
* This file is part of GnuPG.
|
||||||
*
|
*
|
||||||
@ -134,16 +134,16 @@ curl_easy_setopt(CURL *curl,CURLoption option,...)
|
|||||||
curl->proxy=va_arg(ap,char *);
|
curl->proxy=va_arg(ap,char *);
|
||||||
break;
|
break;
|
||||||
case CURLOPT_POST:
|
case CURLOPT_POST:
|
||||||
curl->flags.post=va_arg(ap,unsigned int);
|
curl->flags.post=va_arg(ap,long)?1:0;
|
||||||
break;
|
break;
|
||||||
case CURLOPT_POSTFIELDS:
|
case CURLOPT_POSTFIELDS:
|
||||||
curl->postfields=va_arg(ap,char *);
|
curl->postfields=va_arg(ap,char *);
|
||||||
break;
|
break;
|
||||||
case CURLOPT_FAILONERROR:
|
case CURLOPT_FAILONERROR:
|
||||||
curl->flags.failonerror=va_arg(ap,unsigned int);
|
curl->flags.failonerror=va_arg(ap,long)?1:0;
|
||||||
break;
|
break;
|
||||||
case CURLOPT_VERBOSE:
|
case CURLOPT_VERBOSE:
|
||||||
curl->flags.verbose=va_arg(ap,unsigned int);
|
curl->flags.verbose=va_arg(ap,long)?1:0;
|
||||||
break;
|
break;
|
||||||
case CURLOPT_STDERR:
|
case CURLOPT_STDERR:
|
||||||
curl->errors=va_arg(ap,FILE *);
|
curl->errors=va_arg(ap,FILE *);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* gpgkeys_curl.c - fetch a key via libcurl
|
/* gpgkeys_curl.c - fetch a key via libcurl
|
||||||
* Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
* Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of GnuPG.
|
* This file is part of GnuPG.
|
||||||
*
|
*
|
||||||
@ -285,7 +285,7 @@ main(int argc,char *argv[])
|
|||||||
|
|
||||||
if(follow_redirects)
|
if(follow_redirects)
|
||||||
{
|
{
|
||||||
curl_easy_setopt(curl,CURLOPT_FOLLOWLOCATION,1);
|
curl_easy_setopt(curl,CURLOPT_FOLLOWLOCATION,1L);
|
||||||
if(follow_redirects>0)
|
if(follow_redirects>0)
|
||||||
curl_easy_setopt(curl,CURLOPT_MAXREDIRS,follow_redirects);
|
curl_easy_setopt(curl,CURLOPT_MAXREDIRS,follow_redirects);
|
||||||
}
|
}
|
||||||
@ -297,10 +297,10 @@ main(int argc,char *argv[])
|
|||||||
{
|
{
|
||||||
fprintf(console,"gpgkeys: curl version = %s\n",curl_version());
|
fprintf(console,"gpgkeys: curl version = %s\n",curl_version());
|
||||||
curl_easy_setopt(curl,CURLOPT_STDERR,console);
|
curl_easy_setopt(curl,CURLOPT_STDERR,console);
|
||||||
curl_easy_setopt(curl,CURLOPT_VERBOSE,1);
|
curl_easy_setopt(curl,CURLOPT_VERBOSE,1L);
|
||||||
}
|
}
|
||||||
|
|
||||||
curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,opt->flags.check_cert);
|
curl_easy_setopt(curl,CURLOPT_SSL_VERIFYPEER,(long)opt->flags.check_cert);
|
||||||
curl_easy_setopt(curl,CURLOPT_CAINFO,opt->ca_cert_file);
|
curl_easy_setopt(curl,CURLOPT_CAINFO,opt->ca_cert_file);
|
||||||
|
|
||||||
if(proxy)
|
if(proxy)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* gpgkeys_hkp.c - talk to an HKP keyserver
|
/* gpgkeys_hkp.c - talk to an HKP keyserver
|
||||||
* Copyright (C) 2001, 2002, 2003, 2004, 2005
|
* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
|
||||||
* 2006 Free Software Foundation, Inc.
|
* 2008 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of GnuPG.
|
* This file is part of GnuPG.
|
||||||
*
|
*
|
||||||
@ -197,9 +197,9 @@ send_key(int *r_eof)
|
|||||||
fprintf(console,"gpgkeys: HTTP URL is `%s'\n",request);
|
fprintf(console,"gpgkeys: HTTP URL is `%s'\n",request);
|
||||||
|
|
||||||
curl_easy_setopt(curl,CURLOPT_URL,request);
|
curl_easy_setopt(curl,CURLOPT_URL,request);
|
||||||
curl_easy_setopt(curl,CURLOPT_POST,1);
|
curl_easy_setopt(curl,CURLOPT_POST,1L);
|
||||||
curl_easy_setopt(curl,CURLOPT_POSTFIELDS,key);
|
curl_easy_setopt(curl,CURLOPT_POSTFIELDS,key);
|
||||||
curl_easy_setopt(curl,CURLOPT_FAILONERROR,1);
|
curl_easy_setopt(curl,CURLOPT_FAILONERROR,1L);
|
||||||
|
|
||||||
res=curl_easy_perform(curl);
|
res=curl_easy_perform(curl);
|
||||||
if(res!=0)
|
if(res!=0)
|
||||||
@ -656,7 +656,7 @@ main(int argc,char *argv[])
|
|||||||
{
|
{
|
||||||
fprintf(console,"gpgkeys: curl version = %s\n",curl_version());
|
fprintf(console,"gpgkeys: curl version = %s\n",curl_version());
|
||||||
curl_easy_setopt(curl,CURLOPT_STDERR,console);
|
curl_easy_setopt(curl,CURLOPT_STDERR,console);
|
||||||
curl_easy_setopt(curl,CURLOPT_VERBOSE,1);
|
curl_easy_setopt(curl,CURLOPT_VERBOSE,1L);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(proxy)
|
if(proxy)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user