Commit Graph

33 Commits

Author SHA1 Message Date
Werner Koch cc9a0b69b6 Make use of the *_NAME etc macros.
Replace hardwired strings at many places with new macros from config.h
and use the new strusage macro replacement feature.

* common/asshelp.c (lock_spawning) [W32]: Change the names of the spawn
sentinels.
* agent/command.c (cmd_import_key): Use asprintf to create the prompt.
2013-11-18 14:09:47 +01:00
Werner Koch 096e7457ec Change all quotes in strings and comments to the new GNU standard.
The asymmetric quotes used by GNU in the past (`...') don't render
nicely on modern systems.  We now use two \x27 characters ('...').

The proper solution would be to use the correct Unicode symmetric
quotes here.  However this has the disadvantage that the system
requires Unicode support.  We don't want that today.  If Unicode is
available a generated po file can be used to output proper quotes.  A
simple sed script like the one used for en@quote is sufficient to
change them.

The changes have been done by applying

  sed -i "s/\`\([^'\`]*\)'/'\1'/g"

to most files and fixing obvious problems by hand.  The msgid strings in
the po files were fixed with a similar command.
2012-06-05 19:29:22 +02:00
David Shaw bcf540f2d0 Avoid caches to get the most recent copy of the key. This is bug #1061 2009-05-28 16:20:49 +00:00
David Shaw 07390d3f80 From 1.4:
* curl-shim.h (curl_version): No need to provide a version for
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.
2009-05-11 03:21:41 +00:00
David Shaw c15eb48603 * gpgkeys_curl.c (main), gpgkeys_hkp.c (main): Make sure all libcurl
number options are passed as long.

* curl-shim.c (curl_easy_setopt): Minor tweak to match the real curl
better - libcurl uses 'long', not 'unsigned int'.
2008-04-14 19:41:40 +00:00
Werner Koch 93d3811abc Changed to GPLv3.
Removed intl/.
2007-07-04 19:49:40 +00:00
David Shaw 458efc1d6f From STABLE-BRANCH-1-4
* 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-14 04:24:55 +00:00
Werner Koch b0a06d18a4 Clarified cURL and OpenLDAP license issues.
Made readline support work.
2006-09-22 11:39:45 +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 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 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
Werner Koch 7d4043ca57 Updated FSF street address and preparations for a release candidate. 2005-05-31 08:39:18 +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 5748f595b0 * gpgkeys_curl.c (main): If the http-proxy option is given without any
arguments, try to get the proxy from the environment.

* ksutil.h, ksutil.c (curl_err_to_gpg_err, curl_writer): Copy from
gpgkeys_curl.c.

* gpgkeys_oldhkp.c: Copy from gpgkeys_hkp.c.
2005-04-16 18:50:46 +00:00
David Shaw efa0dd21a2 * gpgkeys_curl.c, gpgkeys_finger.c, gpgkeys_ldap.c: Start using
parse_ks_options and remove a lot of common code.

* ksutil.h, ksutil.c (parse_ks_options): Parse OPAQUE, and default
debug with no arguments to 1.
2005-03-17 16:42:41 +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
David Shaw 203e4835f6 * gpgkeys_finger.c (main), gpgkeys_hkp.c (main): Fix --version output.
* gpgkeys_curl.c (main): Make sure the curl handle is cleaned up on
failure.
2005-02-05 15:04:59 +00:00
David Shaw 5d257ee60e * gpgkeys_ldap.c (print_nocr): New. (get_key): Call it here to
canonicalize line endings.

* gpgkeys_curl.c (writer): Discard everything outside the BEGIN and
END lines when retrieving keys.  Canonicalize line endings.  (main):
Accept FTPS.
2005-01-24 18:23:56 +00:00
David Shaw 2b10681641 * gpgkeys_ldap.c (main): Add "check-cert" option to disable SSL
certificate checking (which is on by default).

* gpgkeys_curl.c (main): Add "debug" option to match the LDAP helper.
Add "check-cert" option to disable SSL certificate checking (which is
on by default).
2005-01-22 03:27:19 +00:00
David Shaw 115ebcfcf8 * gpgkeys_curl.c: Fix typo. 2005-01-18 14:43:14 +00:00
Werner Koch 02a85a958c * gpgkeys_curl.c: s/MAX_PATH/URLMAX_PATH/g to avoid a clash with
the W32 defined macro.  Removed unneeded initialization of static
variables.
* gpgkeys_http.c: Ditto.
* ksutil.h: s/MAX_PATH/URLMAX_PATH/.
2005-01-18 11:16:10 +00:00
David Shaw 8220c9e799 * gpgkeys_curl.c (main): Only allow specified protocols to use the
curl handler.

* Makefile.am: Use LIBCURL_CPPFLAGS instead of LIBCURL_INCLUDES.
2005-01-18 04:24:52 +00:00
David Shaw 996c82ffd6 * ksutil.h, gpgkeys_curl.c, gpgkeys_hkp.c, gpgkeys_ldap.c,
gpgkeys_finger.c, gpgkeys_http.c: Part 2 of the cleanup.  Move all the
various defines to ksutil.h.
2005-01-13 23:37:26 +00:00
David Shaw 1f91ed775c * gpgkeys_curl.c (get_key): Newer versions of libcurl don't define TRUE. 2005-01-10 03:46:12 +00:00
David Shaw d341143cd7 * gpgkeys_curl.c (main): Use new defines for opting out of certain
transfer protocols.  Allow setting HTTP proxy via "http-proxy=foo" option
(there is natural support in libcurl for the http_proxy environment
variable).

* Makefile.am: Remove the conditional since this is all handled in
autoconf now.
2004-12-24 19:48:36 +00:00
David Shaw 97b8f41b08 * gpgkeys_curl.c (main): New "follow-redirects" option. Takes an optional
numeric value for the maximum number of redirects to allow.  Defaults to
5.

* gpgkeys_curl.c (main), gpgkeys_finger.c (main), gpgkeys_hkp.c (main),
gpgkeys_http.c (main), gpgkeys_ldap.c (main): Make sure that a "timeout"
option passed with no arguments is properly handled.
2004-12-22 19:19:10 +00:00
David Shaw 0361c6f01b * gpgkeys_curl.c (get_key, writer): New function to wrap around fwrite to
avoid DLL access problem on win32.

* gpgkeys_http.c (main, get_key): Properly pass authentication info
through to the http library.
2004-12-22 18:07:21 +00:00
David Shaw 52595e06f6 * Makefile.am: Build gpgkeys_http or gpgkeys_curl as needed.
* gpgkeys_curl.c (main, get_key): Minor tweaks to work with either FTP or
HTTP.

* gpgkeys_ftp.c: renamed to gpgkeys_curl.c.
2004-12-22 17:12:23 +00:00