1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-14 00:19:50 +02:00
Commit Graph

83 Commits

Author SHA1 Message Date
Werner Koch
8f70a693ac * rndunix.c (start_gatherer) [ENABLE_SELINUX_HACKS]: Don't allow
logging.

* gpgkeys_finger.c (get_key): s/unsigned char/byte/ due
to a strange typedef for RISC OS.  Noted by Stefan.
2004-10-14 07:21:17 +00:00
David Shaw
d603b7c3a1 * gpgkeys_ldap.c (main), gpgkeys_hkp.c (main), gpgkeys_http.c (main),
gpgkeys_finger.c (main): Call timeout functions before performing an
action that could block for a long time.

* ksutil.h, ksutil.c: New.  Right now just contains timeout functions.
2004-10-13 18:30:29 +00:00
David Shaw
e3fd0f0c60 * gpgkeys_finger.c, gpgkeys_hkp.c, gpgkeys_http.c, gpgkeys_ldap.c: Fix a
few occurances of "filename" to `filename'.
2004-10-11 20:33:22 +00:00
Werner Koch
5bdb171026 * configure.ac: New option --disable-finger.
* keyserver.c (keyserver_spawn): Print an empty string in log_info
if the host is not set (e.g. finger).

* gpgkeys_finger.c: New.
2004-10-11 08:44:35 +00:00
Stefan Bellon
159352d8b7 change back skey to unsigned and cast instead 2004-08-27 21:16:16 +00:00
Stefan Bellon
9355045841 fix type incompatibility 2004-08-27 18:21:32 +00:00
David Shaw
6c5507fff0 * gpgkeys_ldap.c (get_key, search_key), gpgkeys_hkp.c (get_key,
search_key), gpgkeys_http.c (get_key): Do not give informational logs
since this is now done inside gpg.
2004-08-23 19:54:40 +00:00
David Shaw
d612492e7d * gpgkeys_hkp.c (dehtmlize): Understand the quote character (i.e.
""") in HTML responses. (search_key): Search key must be unsigned for
url encoder to work properly for 8-bit values.
2004-08-23 17:43:40 +00:00
David Shaw
357afb5084 * gpgkeys_ldap.c (get_key): Factor out informational display into new
function build_info().
2004-08-23 16:59:11 +00:00
David Shaw
b27b7aea6d * gpgkeys_ldap.c (build_attrs): Properly terminate user ID strings that
got shrunk due to encoding.
2004-08-23 14:24:05 +00:00
David Shaw
4615a538bf * gpgkeys_ldap.c (find_basekeyspacedn): Use LDAP_SCOPE_BASE along with a
full DN rather than LDAP_SCOPE_ONELEVEL plus a filter to find the
pgpServerInfo object.  Some LDAP setups don't like the search. (main):
Stop binding to the server since it seems no server really requires it,
and some require it not be there.
2004-08-23 03:13:27 +00:00
David Shaw
f7a793ae28 * gpgkeys_ldap.c (main): Add "debug" option. This is only really useful
with OpenLDAP, but it's practically vital to debug SSL and TLS setups.
Add "basedn" option.  This allows users to override the autodetection for
base DN.  SSL overrides TLS, so TLS will not be started on SSL connections
(starting an already started car).
2004-07-29 14:01:04 +00:00
David Shaw
a2914a1592 * gpgkeys_ldap.c (build_attrs): Add "pgpKeySize" and "pgpSubKeyID"
attributes so we can do subkey searches.

* gpgkeys_ldap.c (main): Under certain error conditions, we might try and
unbind twice.  Don't.
2004-07-28 19:55:21 +00:00
David Shaw
4552115bbb * gpgkeys_ldap.c (join_two_modlists): New. (send_key): Use new function so
we can try a modify operation first, and fail over to an add if that
fails.  Add cannot cope with the NULLs at the head of the modify request,
so we jump into the list in the middle.
2004-07-28 19:45:23 +00:00
David Shaw
a32297863b * gpgkeys_ldap.c (main): Don't try and error out before making a ldaps
connection to the NAI keyserver since we cannot tell if it is a NAI
keyserver until we connect.  Fail if we cannot find a base keyspace DN.
Fix a false success message for TLS being enabled.
2004-07-28 02:36:45 +00:00
Werner Koch
5d4fb57347 * configure.ac (AM_GNU_GETTEXT_VERSION): New.
(min_automake_version): New.

* LINGUAS: Added all languages we supported in 1.2.5.
Copied all po files from 1.2.5.

* autogen.sh: Updated to the modern version, grepping the required
tool versions from configure.ac.
2004-07-27 15:12:00 +00:00
David Shaw
d9f1eed99e * gpgkeys_http.c: General polish and removal of leftover stuff from
gpgkeys_hkp.c.
2004-05-26 19:38:38 +00:00
David Shaw
50f4faee4a * gpgkeys_http.c (get_key): Cosmetic fix - make sure that URLs with no
path use a path of "/".
2004-05-22 03:35:57 +00:00
David Shaw
d8aa22f172 * gpgkeys_ldap.c (ldap2epochtime): We can always rely on timegm() being
available now, since it's a replacement function.
2004-05-21 15:46:53 +00:00
David Shaw
e934977137 * gpgkeys_http.c: New program to do a simple HTTP file fetch using the
keyserver interface.

* Makefile.am: Build it.
2004-05-20 19:07:10 +00:00
David Shaw
1f5ef591cc * Makefile.am: Don't split LDADD across two lines since some make programs
can't handle blank lines after a \ continuation.  Noted by Christoph
Moench-Tegeder.
2004-02-28 20:38:25 +00:00
David Shaw
0d7cae4663 * gpgkeys_ldap.c (send_key): List pgpCertID as one of the deleted
attributes.  This guarantees that if something goes wrong, we won't be
able to complete the transaction, thus leaving any key already existing on
the server intact.
2004-02-26 01:29:26 +00:00
David Shaw
17ce0c5267 * gpgkeys_ldap.c (delete_one_attr): Removed. (make_one_attr): Delete
functionality added.  Optional deduping functionality added (currently
only used for pgpSignerID). (build_attrs): Translate sig entries into
pgpSignerID.  Properly build the timestamp for pgpKeyCreateTime and
pgpKeyExpireTime.
2004-02-24 03:57:21 +00:00
David Shaw
07a10b451e * gpgkeys_ldap.c (delete_one_attr): New function to replace attributes
with NULL (a "delete" that works even for nonexistant attributes).
(send_key): Use it here to remove attributes so a modify operation starts
with a clean playing field.  Bias sends to modify before add, since (I
suspect) people update their existing keys more often than they make and
send new keys to the server.
2004-02-23 03:43:45 +00:00
David Shaw
3b9d7a6430 * gpgkeys_ldap.c (epoch2ldaptime): New. Converse of ldap2epochtime.
(make_one_attr): New. Build a modification list in memory to send to the
LDAP server. (build_attrs): New. Parse INFO lines sent over by gpg.
(free_mod_values): New.  Unwinds a modification list.
(send_key_keyserver): Renamed from old send_key(). (send_key): New
function to send a key to a LDAP server. (main): Use send_key() for real
LDAP servers, send_key_keyserver() otherwise.
2004-02-22 00:08:53 +00:00
David Shaw
925b982a0b * gpgkeys_ldap.c: Replacement prototypes for setenv and unsetenv.
(search_key): Catch a SIZELIMIT_EXCEEDED error and show the user whatever
the server did give us. (find_basekeyspacedn): There is no guarantee that
namingContexts will be readable.

* Makefile.am: Link gpgkeys_ldap with libutil.a to get the replacement
functions (and eventually translations, etc).
2004-02-20 14:59:02 +00:00
David Shaw
7f148010ab * gpgkeys_ldap.c (ldap2epochtime): LDAP timestamps are UTC, so do not
correct for timezones. (main): Find the basekeyspacedn before we try to
start TLS, so we can give a better error message when a user tries to use
TLS with a LDAP keyserver.
2004-02-19 21:32:15 +00:00
David Shaw
21301028c4 * Makefile.am: Add automake conditionals to symlink gpgkeys_ldaps to
gpgkeys_ldap when needed.

* gpgkeys_ldap.c (main): Add support for LDAPS and TLS connections.
These are only useful and usable when talking to real LDAP keyservers.
Add new "tls" option to tune TLS use from off, to try quietly, to try
loudly, or to require TLS.
2004-02-19 20:09:12 +00:00
David Shaw
7e7364973d * gpgkeys_ldap.c (find_basekeyspacedn): New function to figure out what
kind of LDAP server we're talking to (either real LDAP or the LDAP
keyserver), and return the baseKeySpaceDN to find keys under. (main): Call
it from here, and remove the old code that only handled the LDAP
keyserver.
2004-02-19 15:09:14 +00:00
David Shaw
f3de3a5eb9 * gpgkeys_ldap.c (ldap_to_gpg_err): Make sure that LDAP_OPT_ERROR_NUMBER
is defined before we use it.

* gpgkeys_mailto.in: Fix VERSION number.
2004-02-18 23:05:47 +00:00
Werner Koch
ef3f2d81a1 (send_key): Add a content type. 2004-01-13 11:07:25 +00:00
David Shaw
580faa8675 * gpgkeys_hkp.c (search_key): Catch a mangled input file (useful if
something other than GnuPG is calling the program). (main): Avoid possible
pre-string write.  Noted by Christian Biere.

* gpgkeys_ldap.c (main): Avoid possible pre-string write.
2004-01-12 04:09:37 +00:00
David Shaw
f13f772a29 * gpgkeys_hkp.c (send_key, get_key, main): Work with new HTTP code that
passes the proxy in from the outside.  If the command file sends a proxy,
use it.  If it sends "http-proxy" with no arguments, use $http_proxy from
the environment.
2003-12-28 16:21:46 +00:00
Stefan Bellon
02ae08d6ef cleaned up RISC OS code and removed lots of unnecessary stuff 2003-12-28 14:12:16 +00:00
Werner Koch
ee3f955709 (get_key): Fixed invalid use of fprintf without
format string.
2003-11-27 12:16:43 +00:00
Werner Koch
e6c036948f (gpgkeys_hkp_LDADD): Replaced INTLLIBS by LIBINTL. 2003-10-25 16:26:52 +00:00
David Shaw
df79db51f1 * Makefile.am: Use W32LIBS where appropriate. 2003-07-10 12:32:57 +00:00
David Shaw
0a86b45b9d * gpgkeys_hkp.c, gpgkeys_ldap.c: #include <getopt.h> if it is available.
Also include extern references for optarg and optind since there is no
guarantee that any header file will include them.  Standards?  We don't
need no stinkin' standards

* Makefile.am: Use @GETOPT@ to pull in libiberty on those platforms that
need it.
2003-05-31 03:52:02 +00:00
David Shaw
11fc63ba93 * gpgkeys_hkp.c (dehtmlize, parse_hkp_index): Fix memory corruption bug on
some platforms.
2003-04-09 01:36:16 +00:00
David Shaw
bbd986f3d8 * gpgkeys_hkp.c (get_key): Properly handle CRLF line endings in the
armored key. (main): Accept "try-dns-srv" option.

* Makefile.am: Use @CAPLIBS@ to link in -lcap if we are using
capabilities.  Use @SRVLIBS@ to link in the resolver if we are using DNS
SRV.
2003-03-11 17:42:07 +00:00
David Shaw
a338c1db91 * Makefile.am: Use a local copy of libexecdir along with @PACKAGE@ so it
can be easily overridden at make time.
2003-02-12 04:00:38 +00:00
David Shaw
169f4365da * gpgkeys_mailto.in: Fix regexp to work properly if the "keyid" is not a
keyid, but rather a text string from the user ID.
2003-01-29 23:14:29 +00:00
David Shaw
39dd4d2b29 * gpgkeys_hkp.c (get_key): Use options=mr when getting a key so keyserver
doesn't attach the HTML header which we will just have to discard.
2003-01-06 23:05:39 +00:00
David Shaw
2e4e257f42 * gpgkeys_ldap.c (main), gpgkeys_hkp.c (main): Use new keyserver protocol
version.
2002-11-18 00:43:33 +00:00
David Shaw
d06a95a535 * gpgkeys_ldap.c (get_key): The deduping code requires "pgpcertid", but
that was not available when running without verbose on.  Noted by Stefan.
2002-11-14 14:30:53 +00:00
David Shaw
659e1e9931 * gpgkeys_ldap.c (get_key): Fix typo in deduping code. 2002-11-10 21:32:11 +00:00
David Shaw
ec0d9a416e * gpgkeys_ldap.c (key_in_keylist, add_key_to_keylist, free_keylist,
get_key, search_key): The LDAP keyserver doesn't remove duplicates, so
remove them locally.  Do not include the key modification time in the
search response.
2002-11-05 22:08:02 +00:00
David Shaw
f7b357ebfe * gpgkeys_hkp.c (send_key), gpgkeys_ldap.c (send_key): Properly handle an
input file that does not include any key data at all.
2002-11-04 13:59:08 +00:00
David Shaw
be1d2a4038 * gpgkeys_hkp.c (main), gpgkeys_ldap.c (main): Add -V flag to output
protocol and program version.
2002-10-24 22:33:22 +00:00
David Shaw
45a8594ff9 * Makefile.am: Anything linking with libutil.a needs INTLLIBS as well on
platforms where INTLLIBS is set.
2002-10-21 20:32:38 +00:00