aboutsummaryrefslogtreecommitdiffstats
path: root/keyserver/gpgkeys_curl.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyserver/gpgkeys_curl.c')
-rw-r--r--keyserver/gpgkeys_curl.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/keyserver/gpgkeys_curl.c b/keyserver/gpgkeys_curl.c
index 73aeb09cd..c3dce6abd 100644
--- a/keyserver/gpgkeys_curl.c
+++ b/keyserver/gpgkeys_curl.c
@@ -68,7 +68,7 @@ get_key(char *getkey)
curl_easy_setopt(curl,CURLOPT_ERRORBUFFER,errorbuffer);
res=curl_easy_perform(curl);
- if(res!=0)
+ if(res!=CURLE_OK)
{
fprintf(console,"gpgkeys: %s fetch error %d: %s\n",opt->scheme,
res,errorbuffer);
@@ -77,7 +77,7 @@ get_key(char *getkey)
else
fprintf(output,"\nKEY 0x%s END\n",getkey);
- return KEYSERVER_OK;
+ return curl_err_to_gpg_err(res);
}
static void
@@ -226,27 +226,6 @@ main(int argc,char *argv[])
ret=KEYSERVER_SCHEME_NOT_FOUND;
goto fail;
}
-#ifdef HTTP_VIA_LIBCURL
- else if(strcasecmp(opt->scheme,"http")==0)
- ;
-#endif /* HTTP_VIA_LIBCURL */
-#ifdef HTTPS_VIA_LIBCURL
- else if(strcasecmp(opt->scheme,"https")==0)
- ;
-#endif /* HTTP_VIA_LIBCURL */
-#ifdef FTP_VIA_LIBCURL
- else if(strcasecmp(opt->scheme,"ftp")==0)
- ;
-#endif /* FTP_VIA_LIBCURL */
-#ifdef FTPS_VIA_LIBCURL
- else if(strcasecmp(opt->scheme,"ftps")==0)
- ;
-#endif /* FTPS_VIA_LIBCURL */
- else
- {
- fprintf(console,"gpgkeys: scheme `%s' not supported\n",opt->scheme);
- return KEYSERVER_SCHEME_NOT_FOUND;
- }
if(!opt->host)
{