1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-08 23:37:47 +02:00
Commit Graph

27 Commits

Author SHA1 Message Date
Daniel Kahn Gillmor
2b2f276785
curl-shim: clean up varargs
* keyserver/curl-shim.c (curl_easy_setopt) : ensure that va_end is
  called.

--

stdarg(3) says:
      Each invocation of va_start() must be matched by a
      corresponding invocation of va_end() in the same function.

Observed by Joshua Rogers <honey@internot.info>

Debian-Bug-Id: #773475

[dkg: rebased to STABLE-BRANCH-1-4]
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2015-02-23 10:52:48 +01:00
David Shaw
ca0b94d4d4 Emulate curl_easy_getinfo and CURLINFO_RESPONSE_CODE in curl-shim.
* keyserver/curl-shim.h, keyserver/curl-shim.c (curl_easy_getinfo):
  New. Return the HTTP status code for the last transfer.
2013-03-02 20:39:22 -05:00
David Shaw
f2f12f41ef Fix issue 1446: honor ports given in SRV responses.
* common/http.c (send_request, connect_server, http_open): Use a
  struct srv instead of a single srvtag so we can pass the chosen host
  and port back to the caller.
  (connect_server): Use the proper port in the HAVE_GETADDRINFO case.

* keyserver/curl-shim.c (curl_easy_perform): Use struct srv and log
  chosen host and port.

* keyserver/gpgkeys_hkp.c (main): Properly take the port given by SRV.

Backported from ba9e974f1f
2012-12-18 21:58:53 -05:00
Werner Koch
20fe42d10b Restructured the compat functions and changed its license.
New fucntion xstrconcat for future use.
2009-08-25 20:00:24 +00:00
David Shaw
e8436d575e Avoid caches to get the most recent copy of the key. This is bug
#1061
2009-05-26 14:15:56 +00:00
David Shaw
a929f4c78e * curl-shim.h, curl-shim.c (curl_easy_setopt, curl_easy_perform): Add
a CURLOPT_SRVTAG_GPG_HACK (passed through the the http engine).

* http.h: Allow passing srvtag to http_open and http_open_document.

 * http.c (http_open, http_open_document): Allow passing srvtag to
http_open and http_open_document.
2009-04-03 03:59:07 +00:00
David Shaw
06278768b4 * gpgkeys_curl.c (main), gpgkeys_hkp.c (main): Make sure all libcurl
number options are passed as long.
2008-04-14 17:41:47 +00:00
David Shaw
b9cbb0aa0b * curl-shim.c (curl_easy_setopt): Minor tweak to match the real curl
better - libcurl uses 'long', not 'unsigned int'.
2008-04-14 16:08:00 +00:00
Werner Koch
9a2a818887 Switched to GPLv3.
Updated gettext.
2007-10-23 10:48:09 +00:00
David Shaw
7a81947753 * gpgkeys_curl.c (main): Use curl_version_info to verify that the
protocol we're about to use is actually available.

* curl-shim.h, curl-shim.c (curl_free): Make into a macro.
(curl_version_info): New.  Only advertises "http" for our shim, of
course.
2007-03-13 17:53:57 +00:00
David Shaw
1475939994 * gpgkeys_ldap.c (send_key): Missing a free().
* curl-shim.c (curl_easy_perform): Some debugging items that may be
handy.
2007-02-11 03:56:59 +00:00
David Shaw
b8bd7b6186 * curl-shim.h, curl-shim.c, gpgkeys_hkp.c: Rename curl_escape() to
curl_easy_escape() to match cURL.
2007-01-16 18:12:43 +00:00
David Shaw
c45f73774d * curl-shim.c (curl_easy_perform): Minor cleanup of proxy code. 2006-07-21 02:19:43 +00:00
David Shaw
5476afe1b4 * gpgkeys_ldap.c (printquoted), curl-shim.c (curl_escape): Fix bad
encoding of characters > 127.  Noted by Nalin Dahyabhai.
2006-07-12 21:16:57 +00:00
David Shaw
79ec50f77d * curl-shim.h, curl-shim.c (curl_easy_init, curl_easy_setopt,
curl_easy_perform): Mingw has 'stderr' as a macro?
2006-02-22 02:11:35 +00:00
David Shaw
e4206de3f5 * curl-shim.h, curl-shim.c (curl_easy_init, curl_easy_setopt,
curl_easy_perform): Add CURLOPT_VERBOSE and CURLOPT_STDERR for easier
debugging.
2006-02-21 16:16:09 +00:00
David Shaw
d6e918e40f * curl-shim.c (curl_easy_perform): Fix build warning (code before
declaration).
2005-12-06 18:49:34 +00:00
Werner Koch
a1cdf3c75f Converted all m_free to xfree etc. 2005-07-27 18:10:56 +00:00
David Shaw
6f0ed8571b * gpgkeys_curl.c (get_key, main): Don't try and be smart about what
protocols we handle.  Directly pass them to curl or fake-curl and see if
an error comes back.

* curl-shim.h, curl-shim.c (handle_error), ksutil.c (curl_err_to_gpg_err):
Add support for CURLE_UNSUPPORTED_PROTOCOL in fake curl.

* Makefile.am: Don't need -DFAKE_CURL any longer since it's in config.h.
2005-07-20 21:48:28 +00:00
David Shaw
ccab129be5 * gpgkeys_mailto.in, gpgkeys_test.in: Use @VERSION@ so version string
stays up to date.

* gpgkeys_http.c: Don't need to define HTTP_PROXY_ENV here since it's
in ksutil.h.

* gpgkeys_curl.c (get_key, main), gpgkeys_hkp.c (main): Pass AUTH
values to curl or curl-shim.

* curl-shim.c (curl_easy_perform), gpgkeys_curl.c (main),
gpgkeys_hkp.c (main): Use curl-style proxy semantics.
2005-06-23 23:42:35 +00:00
David Shaw
d65763eccd * curl-shim.h, curl-shim.c (curl_easy_setopt, curl_easy_perform): Add
CURLOPT_USERPWD option for HTTP auth.
2005-06-23 04:44:20 +00:00
Werner Koch
7d4043ca57 Updated FSF street address and preparations for a release candidate. 2005-05-31 08:39:18 +00:00
David Shaw
0884653a13 * gpgkeys_hkp.c: New hkp handler that uses curl or curl-shim.
* Makefile.am: Build new gpgkeys_hkp.

* curl-shim.c (curl_easy_perform): Cleanup.
2005-04-17 02:18:32 +00:00
David Shaw
f50e99ed7b * curl-shim.h, curl-shim.c (handle_error, curl_easy_setopt,
curl_easy_perform): Add POST functionality to the curl shim.
2005-04-17 01:39:24 +00:00
David Shaw
d8e1f7656b * curl-shim.h, curl-shim.c (curl_escape, curl_free): Emulate
curl_escape and curl_free.
2005-04-16 22:21:28 +00:00
David Shaw
2833a0eadc * curl-shim.c (curl_easy_perform): Fix compile warning.
* curl-shim.h, gpgkeys_curl.c (main), gpgkeys_ldap.c (main): Add
ca-cert-file option, to pass in the SSL cert.
2005-02-12 03:15:02 +00:00
David Shaw
25001837e9 * curl-shim.h, curl-shim.c: New. This is code to fake the curl API in
terms of the current HTTP iobuf API.

* gpgkeys_curl.c [FAKE_CURL], Makefile.am: If FAKE_CURL is set, link with
the iobuf code rather than libcurl.
2005-02-11 18:05:13 +00:00