From 8220c9e799b2c4c43e51f712b372892f68a44d6f Mon Sep 17 00:00:00 2001 From: David Shaw Date: Tue, 18 Jan 2005 04:24:52 +0000 Subject: [PATCH] * gpgkeys_curl.c (main): Only allow specified protocols to use the curl handler. * Makefile.am: Use LIBCURL_CPPFLAGS instead of LIBCURL_INCLUDES. --- keyserver/ChangeLog | 7 +++++++ keyserver/Makefile.am | 2 +- keyserver/gpgkeys_curl.c | 17 ++++++++++------- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/keyserver/ChangeLog b/keyserver/ChangeLog index 4b380087c..1dda7cdc6 100644 --- a/keyserver/ChangeLog +++ b/keyserver/ChangeLog @@ -1,3 +1,10 @@ +2005-01-17 David Shaw + + * gpgkeys_curl.c (main): Only allow specified protocols to use the + curl handler. + + * Makefile.am: Use LIBCURL_CPPFLAGS instead of LIBCURL_INCLUDES. + 2005-01-13 David Shaw * ksutil.h, gpgkeys_curl.c, gpgkeys_hkp.c, gpgkeys_ldap.c, diff --git a/keyserver/Makefile.am b/keyserver/Makefile.am index eb004f6cb..68c7cd832 100644 --- a/keyserver/Makefile.am +++ b/keyserver/Makefile.am @@ -39,5 +39,5 @@ gpgkeys_ldap_LDADD = ../util/libutil.a @LDAPLIBS@ @NETLIBS@ $(other_libs) @GETOP gpgkeys_hkp_LDADD = ../util/libutil.a @NETLIBS@ @SRVLIBS@ $(other_libs) @GETOPT@ @W32LIBS@ gpgkeys_http_LDADD = ../util/libutil.a @NETLIBS@ @SRVLIBS@ $(other_libs) @GETOPT@ @W32LIBS@ gpgkeys_finger_LDADD = ../util/libutil.a @NETLIBS@ $(other_libs) @GETOPT@ @W32LIBS@ -gpgkeys_curl_CPPFLAGS = @LIBCURL_INCLUDES@ +gpgkeys_curl_CPPFLAGS = @LIBCURL_CPPFLAGS@ gpgkeys_curl_LDADD = @LIBCURL@ @GETOPT@ diff --git a/keyserver/gpgkeys_curl.c b/keyserver/gpgkeys_curl.c index ba645782b..c553d79a2 100644 --- a/keyserver/gpgkeys_curl.c +++ b/keyserver/gpgkeys_curl.c @@ -292,20 +292,23 @@ main(int argc,char *argv[]) fprintf(console,"gpgkeys: no scheme supplied!\n"); return KEYSERVER_SCHEME_NOT_FOUND; } -#ifndef HTTP_VIA_LIBCURL +#ifdef HTTP_VIA_LIBCURL else if(strcasecmp(scheme,"http")==0) - { - fprintf(console,"gpgkeys: scheme `%s' not supported\n",scheme); - return KEYSERVER_SCHEME_NOT_FOUND; - } + ; #endif /* HTTP_VIA_LIBCURL */ -#ifndef FTP_VIA_LIBCURL +#ifdef HTTPS_VIA_LIBCURL + else if(strcasecmp(scheme,"https")==0) + ; +#endif /* HTTP_VIA_LIBCURL */ +#ifdef FTP_VIA_LIBCURL else if(strcasecmp(scheme,"ftp")==0) + ; +#endif /* FTP_VIA_LIBCURL */ + else { fprintf(console,"gpgkeys: scheme `%s' not supported\n",scheme); return KEYSERVER_SCHEME_NOT_FOUND; } -#endif /* FTP_VIA_LIBCURL */ if(timeout && register_timeout()==-1) {