aboutsummaryrefslogtreecommitdiffstats
path: root/keyserver (follow)
Commit message (Collapse)AuthorAgeFilesLines
* curl-shim: clean up varargsDaniel Kahn Gillmor2015-02-231-0/+2
| | | | | | | | | | | | | | | | | | * 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 <[email protected]> Debian-Bug-Id: #773475 [dkg: rebased to STABLE-BRANCH-1-4] Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* Modernize to automake 1.14.Werner Koch2015-01-191-8/+11
| | | | | | | | | | | | * Makefile.am (AUTOMAKE_OPTIONS): Move to ... * configure.ac (AM_INIT_AUTOMAKE): here and add serial-tests. * keyserver/Makefile.am: Replace INCLUDES by AM_CPPFLAGS. * mpi/Makefile.am: Ditto. * util/Makefile.am: Ditto. * keyserver/Makefile.am: Ditto. Adjusted other things. * m4/intl.m4, m4/po.m4: Use autoconf's AC_PROG_MKDIR_P.
* keyserver: Allow use of cURL's default CA store.Werner Koch2013-10-042-3/+5
| | | | | | | | | | | * 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 <[email protected]> (cherry picked from commit e957b9b3f408491f36660499b215aebcf2633a95)
* Differentiate between success (full or partial), not-found, and failure.David Shaw2013-03-031-11/+76
| | | | | | * keyserver/gpgkeys_hkp.c (get_key): Use curl_easy_setinfo to get the HTTP status code so we can tell the difference between a successful retrieval, a partial retrieval, a not-found, or a server failed.
* Emulate curl_easy_getinfo and CURLINFO_RESPONSE_CODE in curl-shim.David Shaw2013-03-032-2/+31
| | | | | * keyserver/curl-shim.h, keyserver/curl-shim.c (curl_easy_getinfo): New. Return the HTTP status code for the last transfer.
* Last fix for the SRV record patches.Werner Koch2012-12-201-0/+2
| | | | | | | | * keyserver/gpgkeys_hkp.c (srv_replace): Make sure SRVCOUNT is always initialized. -- See commit 5c557a51.
* Issue 1447: Pass proper Host header and SNI when SRV is used with curl.David Shaw2012-12-191-34/+121
| | | | | | | | | | | | | | | | | | | * configure.ac: Check for inet_ntop. * m4/libcurl.m4: Provide a #define for the version of the curl library. * keyserver/gpgkeys_hkp.c (main, srv_replace): Call getaddrinfo() on each target. Once we find one that resolves to an address (whether IPv4 or IPv6), pass it into libcurl via CURLOPT_RESOLVE using the SRV name as the "host". Force the HTTP Host header to be the same. Backported from 6b1f71055ebab36989e2089cfde319d2ba40ada7 * keyserver/gpgkeys_hkp.c (main): Only default try-dns-srv to on if we have SRV support in the first place. Backported from 732f3d1d4786239db5f31f82cc04ec79326cc13c
* Fix issue 1446: honor ports given in SRV responses.David Shaw2012-12-192-9/+33
| | | | | | | | | | | | | | * 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 ba9e974f1fd85b3dbbfb5e26d7a14f71d07c7cf2
* Allow building with the 32 bit mingw-w64 toolchain.Werner Koch2012-01-121-5/+19
| | | | | | | | | | | | | | | | * scripts/autogen.sh <--build-w32>: Support i686-w64-mingw32 and use it by default if installed. * keyserver/gpgkeys_ldap.c (my_ldap_start_tls_s): Define macro depending on compiler version. (main): Use new macro. * util/miscutil.c [!HAVE_TIMEGM]: Add prototype for the timegm autoconf replacement function. -- It seems that the LDAP keyserver helper build with the old mingw32 toolchain never worked correctly for LDAPS. The prototype there for ldap_start_tls_s is plainly wrong for Windows. Anyway I included special support so not to break building with the old compiler.
* Use the longest key ID available when talking to a HKP server.David Shaw2011-12-281-7/+13
| | | | | | This is issue 1340. Now that PKSD is dead, and SKS supports long key IDs, this is safe to do. Patch from Daniel Kahn Gillmor <[email protected]>.
* Rename all ChangeLog files to ChangeLog-2011.Werner Koch2011-12-021-0/+7
| | | | * ChangeLog: New file.
* Removed some set but unused vars.Werner Koch2011-08-092-5/+8
|
* Last minute fixesWerner Koch2009-09-022-2/+9
|
* Restructured the compat functions and changed its license.Werner Koch2009-08-257-24/+69
| | | | | New fucntion xstrconcat for future use.
* * gpgkeys_hkp.c (main, srv_replace): Minor tweaks to use the DNS-SDDavid Shaw2009-07-082-5/+23
| | | | | | names ("pgpkey-http" and "pgpkey-https") in SRV lookups instead of "hkp" and "hkps".
* Fix a couple of minor bugs.Werner Koch2009-06-242-4/+12
|
* * Makefile.am (gpgkeys_hkp_LDADD): Need DNSLIBS for the resolver nowDavid Shaw2009-06-092-2/+7
| | | | | that we're using SRVs.
* * gpgkeys_hkp.c (srv_replace): Fix build warning.David Shaw2009-05-282-0/+6
|
* Avoid caches to get the most recent copy of the key. This is bugDavid Shaw2009-05-265-2/+97
| | | | | #1061
* * gpgkeys_mailto.in: Set 'mail-from' as a keyserver-option, ratherDavid Shaw2009-05-042-27/+20
| | | | | than the ugly ?from= syntax.
* * gpgkeys_hkp.c (srv_replace): New function to transform a SRVDavid Shaw2009-04-212-17/+83
| | | | | | hostname to a real hostname. (main): Call it from here for the HAVE_LIBCURL case (without libcurl is handled via the curl-shim).
* * curl-shim.h, curl-shim.c (curl_easy_setopt, curl_easy_perform): AddDavid Shaw2009-04-033-5/+18
| | | | | | | | | | 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.
* * gpgkeys_hkp.c (main): Switch default port for SSLized HKP to 443David Shaw2009-04-022-1/+6
| | | | | (i.e. the regular https port).
* * gpgkeys_hkp.c (send_key, get_key, get_name, search_key, main): AddDavid Shaw2009-02-032-22/+41
| | | | | support for SSLized HKP.
* * curl-shim.h, gpgkeys_curl.c, gpgkeys_hkp.c (main): Always show curlDavid Shaw2008-11-184-9/+8
| | | | | version (even for curl-shim).
* Make --version close to GNU standards.Werner Koch2008-11-184-2/+16
|
* * curl-shim.h (curl_version): No need to provide a version forDavid Shaw2008-11-186-15/+30
| | | | | | | | | | | curl-shim as it always matches the GnuPG version. * gpgkeys_curl.c, gpgkeys_hkp.c (main): Show which version of curl we're using as part of --version. * gpgkeys_curl.c, gpgkeys_finger.c, gpgkeys_hkp.c, gpgkeys_ldap.c (show_help): Document --version.
* * gpgkeys_curl.c (main), gpgkeys_hkp.c (main): Make sure all libcurlDavid Shaw2008-04-144-10/+13
| | | | | number options are passed as long.
* * curl-shim.c (curl_easy_setopt): Minor tweak to match the real curlDavid Shaw2008-04-142-3/+8
| | | | | better - libcurl uses 'long', not 'unsigned int'.
* Powerpc64 fix.Werner Koch2008-03-252-2/+7
|
* * Makefile.am: Fix compile error when libcurl is in a nonstandardDavid Shaw2007-12-172-1/+8
| | | | | location.
* Switched to GPLv3.Werner Koch2007-10-2311-44/+22
| | | | | Updated gettext.
* * gpgkeys_ldap.c (main): Fix bug in setting up whether to verify peerDavid Shaw2007-07-292-1/+7
| | | | | | SSL cert. This used to work with older OpenLDAP, but is now more strictly handled.
* * gpgkeys_ldap.c: Fix build warning with mozldap.David Shaw2007-07-272-0/+7
|
* * gpgkeys_ldap.c (search_key, main): Fix bug where searching for fooDavid Shaw2007-07-272-5/+19
| | | | | | bar (no quotes) on the command line resulted in searching for "foo\2Abar" due to LDAP quoting. The proper search is "foo*bar".
* * gpgkeys_hkp.c (main): Show curl or fake-curl version string.David Shaw2007-04-163-3/+7
| | | | | * Makefile.am: Link with libcompat.a for ascii_str(n)casecmp.
* * gpgkeys_curl.c, gpgkeys_ldap.c, gpgkeys_hkp.c, ksutil.c: Rename allDavid Shaw2007-04-165-38/+48
| | | | | | str(n)casecmp to ascii_str(n)casecmp. We want the locale-independent ones here.
* * gpgkeys_curl.c (main): Use curl_version_info to verify that theDavid Shaw2007-03-134-6/+43
| | | | | | | | | 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.
* * gpgkeys_ldap.c (send_key): Missing a free().David Shaw2007-02-113-1/+16
| | | | | | * curl-shim.c (curl_easy_perform): Some debugging items that may be handy.
* * curl-shim.h, curl-shim.c, gpgkeys_hkp.c: Rename curl_escape() toDavid Shaw2007-01-164-7/+12
| | | | | curl_easy_escape() to match cURL.
* * gpgkeys_hkp.c (send_key): Allow GPG to send any armored key lineDavid Shaw2007-01-162-20/+29
| | | | | length without problems. Reported by Felix von Leitner.
* * ksutil.c (classify_ks_search): Try and recognize a key ID evenDavid Shaw2006-12-042-4/+22
| | | | | | | without the 0x prefix. This isn't exact (it's possible that a user ID string happens to be 8 or 16 digits of hex), but it's extremely unlikely. Plus GPG itself makes the same assumption.
* * gpgkeys_hkp.c (search_key): HKP keyservers like the 0x to be presentDavid Shaw2006-12-032-0/+11
| | | | | when searching by keyID.
* * gpgkeys_hkp.c (curl_mrindex_writer): Revert previous change.David Shaw2006-11-062-5/+8
| | | | | Key-not-found still has a HTML response.
* * gpgkeys_hkp.c (curl_mrindex_writer): Print a warning if we see HTMLDavid Shaw2006-10-202-1/+9
| | | | | coming back from a MR hkp query.
* Move strsep() and ascii_isspace() to libcompat.David Shaw2006-09-281-1/+1
|
* Put in the basic wiring (just hextobyte for now) for a libcompat.a thatDavid Shaw2006-09-285-29/+7
| | | | | | | can contain replacement files that can be linked to keyserver helpers without bringing in the whole libutil.a. libutil.a contains a complete copy of libcompat.a so we only need to link to one of them.
* * gpgkeys_ldap.c (build_attrs), ksutil.c (ks_toupper, ks_strcasecmp),David Shaw2006-09-284-33/+10
| | | | | | ksutil.h: Remove the need for strcasecmp as the field tags are always lowercase.
* Allow to build w/o curl.Werner Koch2006-09-268-11/+139
|
* * Makefile.am: Fix missing include path for gpgkeys_finger (needs theDavid Shaw2006-07-262-0/+7
| | | | | | libcurl path, even though it doesn't use libcurl because of ksutil.c:curl_err_to_gpg_err(). Noted by Gilbert Fernandes.