1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-11-04 20:38:50 +01:00
Commit Graph

170 Commits

Author SHA1 Message Date
David Shaw
b17fcc5d51 Put in the basic wiring (just hextobyte for now) for a libcompat.a that
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.
2006-09-28 19:36:55 +00:00
David Shaw
61765b20e6 * gpgkeys_ldap.c (build_attrs), ksutil.c (ks_toupper, ks_strcasecmp),
ksutil.h: Remove the need for strcasecmp as the field tags are always
lowercase.
2006-09-28 19:30:03 +00:00
Werner Koch
29f68725d0 Allow to build w/o curl. 2006-09-26 14:15:17 +00:00
David Shaw
519435f06c * Makefile.am: Fix missing include path for gpgkeys_finger (needs the
libcurl path, even though it doesn't use libcurl because of
ksutil.c:curl_err_to_gpg_err().  Noted by Gilbert Fernandes.
2006-07-26 21:12:55 +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
b8b482b596 * gpgkeys_hkp.c (send_key), gpgkeys_ldap.c (send_key,
send_key_keyserver): Improved version of previous fix.  Force match on
spaces in string.
2006-07-17 04:11:30 +00:00
David Shaw
2dc880aa9e * gpgkeys_hkp.c (send_key), gpgkeys_ldap.c (send_key, send_key_keyserver):
Fix string matching problem when the ascii armored form of the key happens
to match "KEY" at the beginning of the line.
2006-07-14 16:07:01 +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
f37dac88cb * gpgkeys_http.c, gpgkeys_oldhkp.c: Removed. 2006-04-26 21:49:43 +00:00
David Shaw
e87d36ccf6 * Makefile.am: Don't build gpgkeys_http or gpgkeys_(old)hkp any longer as
this is done via curl or fake-curl.

* ksutil.h, ksutil.c, gpgkeys_hkp.c, gpgkeys_curl.c: Minor #include tweaks
as FAKE_CURL is no longer meaningful.
2006-04-26 21:48:29 +00:00
David Shaw
ed776a913f * gpgkeys_ldap.c (ldap_quote, get_name, search_key): LDAP-quote
directly into place rather than mallocing temporary buffers.
2006-04-11 03:25:25 +00:00
David Shaw
af0a0ae6ee * gpgkeys_ldap.c (get_name): Build strings with strcat rather than
using sprintf which is harder to read and modify.
2006-04-11 03:13:46 +00:00
David Shaw
3011a39284 * ksutil.h, ksutil.c (classify_ks_search): Add KS_SEARCH_KEYID_SHORT
and KS_SEARCH_KEYID_LONG to search for a key ID.

* gpgkeys_ldap.c (search_key): Use it here to flip from pgpUserID
searches to pgpKeyID or pgpCertID.
2006-04-11 03:00:50 +00:00
David Shaw
0ea95fd80f * gpgkeys_ldap.c: #define LDAP_DEPRECATED for newer OpenLDAPs so they use
the regular old API that is compatible with other LDAP libraries.
2006-03-27 19:06:46 +00:00
David Shaw
9523139ee7 * gpgkeys_ldap.c (main): Fix build problem with non-OpenLDAP LDAP
libraries that have TLS.
2006-03-03 21:55:38 +00:00
David Shaw
0302c7e0ac * ksutil.c (init_ks_options): Default include-revoked and include-subkeys
to on, as gpg isn't doing this any longer.
2006-02-23 21:06:32 +00:00
David Shaw
482a3a0101 * gpgkeys_hkp.c (get_name): A GETNAME query turns exact=on to cut down on
odd matches.
2006-02-22 23:19:36 +00:00
David Shaw
e396cd2c7c * gpgkeys_ldap.c (make_one_attr, build_attrs, send_key): Don't allow
duplicate attributes as OpenLDAP is now enforcing this.
2006-02-22 04:19:21 +00:00
David Shaw
c68649e1b1 * gpgkeys_ldap.c (main): Add binddn and bindpw so users can pass
credentials to a remote LDAP server.
2006-02-22 03:49:49 +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
2c4b5d5de9 * gpgkeys_hkp.c (send_key): Do not escape the '=' in the HTTP POST when
uploading a key.
2006-01-16 17:59:46 +00:00
David Shaw
da9a10d2b0 * ksutil.h, ksutil.c (parse_ks_options): New keyserver command "getname".
* gpgkeys_hkp.c (main, get_name), gpgkeys_ldap.c (main, get_name): Use it
here to do direct name (rather than key ID) fetches.
2005-12-23 20:51:48 +00:00
David Shaw
5432755319 * ksutil.h, ksutil.c (curl_armor_writer, curl_writer,
curl_writer_finalize): New functionality to handle binary format keys by
armoring them for input to GPG.

* gpgkeys_curl.c (get_key), gpgkeys_hkp.c (get_key): Call it here.
2005-12-19 19:39:32 +00:00
David Shaw
a4fae95d04 * gpgkeys_finger.c (get_key), gpgkeys_curl.c (get_key): Better language
for the key-not-found error.
2005-12-07 23:00:30 +00:00
David Shaw
c826ccdec1 * ksutil.c (curl_err_to_gpg_err): Add CURLE_OK and CURLE_COULDNT_CONNECT.
* gpgkeys_curl.c (get_key): Give key-not-found error if no data is found
(or file itself is not found) during a fetch.
2005-12-07 22:25:58 +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
David Shaw
2a662f7870 Fix various build warnings reported by Joe Vender on MinGW. 2005-11-03 04:46:20 +00:00
David Shaw
aec65a94d8 * ksutil.h, ksutil.c (parse_ks_options): Remove exact-name and
exact-email.  (classify_ks_search): Mimic the gpg search modes instead
with *, =, <, and @.

* gpgkeys_ldap.c (search_key), gpgkeys_hkp.c (search_key): Call them
here.  Suggested by Jason Harris.
2005-08-26 04:24:46 +00:00
David Shaw
70bf6d9204 * ksutil.h, ksutil.c (parse_ks_options): New keyserver-option exact-name.
The last of exact-name and exact-email overrides the earlier.

* gpgkeys_ldap.c (search_key), gpgkeys_hkp.c (search_key): Use it here to
do a name-only search.
2005-08-18 21:14:16 +00:00
David Shaw
2d353af65d * gpgkeys_ldap.c (ldap_quote): \-quote a string for LDAP.
* gpgkeys_ldap.c (search_key): Use it here to escape reserved characters
in searches.
2005-08-18 17:40:04 +00:00
David Shaw
e9b444a9d0 * ksutil.h, ksutil.c (parse_ks_options): New keyserver-option
exact-email.

* gpgkeys_ldap.c (search_key), gpgkeys_hkp.c (search_key): Use it here
to do an email-only search.
2005-08-18 04:17:20 +00:00
David Shaw
f02c0f6849 * Makefile.am: Include LDAP_CPPFLAGS when building LDAP. 2005-08-08 17:35:29 +00:00
David Shaw
1990aacce0 * gpgkeys_hkp.c (main), gpgkeys_curl.c (main), curl-shim.h: Show
version of curl (or curl-shim) when debug is set.
2005-08-04 03:59:16 +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
David Shaw
ffa6854080 * gpgkeys_http.c (get_key), gpgkeys_oldhkp (send_key, get_key,
search_key): No longer need to pass a proxyauth.

* gpgkeys_http.c (get_key): Pass auth outside of the URL.
2005-06-23 04:26:01 +00:00
David Shaw
7f4d49b470 * gpgkeys_http.c (get_key), gpgkeys_oldhkp.c (send_key, get_key,
search_key): Fix http_open/http_open_document calls to pass NULL for
auth and proxyauth since these programs pass them in the URL.
2005-06-22 04:16:29 +00:00
David Shaw
4e9797031f * gpgkeys_hkp.c (append_path, send_key, get_key, search_key, main),
gpgkeys_oldhkp.c (main): Properly handle double slashes in paths.
2005-06-21 04:24:10 +00:00
David Shaw
34ff103d2a * ksutil.c (init_ks_options, parse_ks_options): Provide a default "/"
path unless overridden by the config.  Allow config to specify items
multiple times and take the last specified item.
2005-06-05 14:34:47 +00:00
David Shaw
c347404bfd * gpgkeys_hkp.c, gpgkeys_oldhkp.c: Add support for HKP servers that
aren't at the root path.  Suggested by Jack Bates.
2005-06-04 23:09:27 +00:00
David Shaw
a644a1d3d7 * ksutil.c [HAVE_DOSISH_SYSTEM]: Fix warnings on mingw32. Noted by Joe
Vender.
2005-06-01 19:08:56 +00:00
David Shaw
d9d902dffb * ksutil.h, ksutil.c: #ifdef so we can build without libcurl or
fake-curl.
2005-05-04 13:34:25 +00:00
David Shaw
049195f9e0 * gpgkeys_http.c: Need GET defined. 2005-05-04 02:46:02 +00:00
David Shaw
5e6d360596 * gpgkeys_hkp.c, gpgkeys_oldhkp.c, ksutil.h: Some minor cleanup and
comments as to the size of MAX_LINE and MAX_URL.
2005-05-02 00:46:39 +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
5609f5eafd * ksutil.h, ksutil.c (curl_writer), gpgkeys_curl.c (get_key): Pass a
context to curl_writer so we can support multiple fetches in a single
session.
2005-04-17 01:52:04 +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