aboutsummaryrefslogtreecommitdiffstats
path: root/keyserver/gpgkeys_ldap.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* * gpgkeys_ldap.c (print_nocr): New. (get_key): Call it here toDavid Shaw2005-01-241-1/+13
| | | | | | | | | canonicalize line endings. * gpgkeys_curl.c (writer): Discard everything outside the BEGIN and END lines when retrieving keys. Canonicalize line endings. (main): Accept FTPS.
* * gpgkeys_ldap.c (main): Add "check-cert" option to disable SSLDavid Shaw2005-01-221-7/+35
| | | | | | | | | 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).
* * ksutil.h, gpgkeys_curl.c, gpgkeys_hkp.c, gpgkeys_ldap.c,David Shaw2005-01-131-20/+1
| | | | | | gpgkeys_finger.c, gpgkeys_http.c: Part 2 of the cleanup. Move all the various defines to ksutil.h.
* * gpgkeys_finger.c, gpgkeys_hkp.c, gpgkeys_http.c, gpgkeys_ldap.c: Part 1David Shaw2005-01-131-20/+28
| | | | | of a minor cleanup to use #defines instead of hard-coded sizes.
* * gpgkeys_curl.c (main): New "follow-redirects" option. Takes an optionalDavid Shaw2004-12-221-1/+3
| | | | | | | | | | 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.
* * gpgkeys_ldap.c (main, show_help): Kludge to implement standardWerner Koch2004-10-151-3/+22
| | | | | | | | | GNU options. Factored help printing out. * gpgkeys_finger.c (main, show_help): Ditto. * gpgkeys_hkp.c (main, show_help): Ditto. * gpgkeys_http.c (main, show_help): Ditto. * gpgkeys_test.in, gpgkeys_mailto.in: Implement --version and --help.
* * gpgkeys_ldap.c (main), gpgkeys_hkp.c (main), gpgkeys_http.c (main),David Shaw2004-10-131-0/+24
| | | | | | | | 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.
* * gpgkeys_finger.c, gpgkeys_hkp.c, gpgkeys_http.c, gpgkeys_ldap.c: Fix aDavid Shaw2004-10-111-2/+2
| | | | | few occurances of "filename" to `filename'.
* * gpgkeys_ldap.c (get_key, search_key), gpgkeys_hkp.c (get_key,David Shaw2004-08-231-7/+0
| | | | | | search_key), gpgkeys_http.c (get_key): Do not give informational logs since this is now done inside gpg.
* * gpgkeys_ldap.c (get_key): Factor out informational display into newDavid Shaw2004-08-231-74/+78
| | | | | function build_info().
* * gpgkeys_ldap.c (build_attrs): Properly terminate user ID strings thatDavid Shaw2004-08-231-0/+2
| | | | | got shrunk due to encoding.
* * gpgkeys_ldap.c (find_basekeyspacedn): Use LDAP_SCOPE_BASE along with aDavid Shaw2004-08-231-7/+24
| | | | | | | | 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.
* * gpgkeys_ldap.c (main): Add "debug" option. This is only really usefulDavid Shaw2004-07-291-11/+60
| | | | | | | | 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).
* * gpgkeys_ldap.c (build_attrs): Add "pgpKeySize" and "pgpSubKeyID"David Shaw2004-07-281-2/+42
| | | | | | | | attributes so we can do subkey searches. * gpgkeys_ldap.c (main): Under certain error conditions, we might try and unbind twice. Don't.
* * gpgkeys_ldap.c (join_two_modlists): New. (send_key): Use new function soDavid Shaw2004-07-281-19/+62
| | | | | | | 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.
* * gpgkeys_ldap.c (main): Don't try and error out before making a ldapsDavid Shaw2004-07-281-28/+19
| | | | | | | 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.
* * configure.ac (AM_GNU_GETTEXT_VERSION): New.Werner Koch2004-07-271-0/+7
| | | | | | | | | | | (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.
* * gpgkeys_ldap.c (ldap2epochtime): We can always rely on timegm() beingDavid Shaw2004-05-211-22/+3
| | | | | available now, since it's a replacement function.
* * gpgkeys_ldap.c (send_key): List pgpCertID as one of the deletedDavid Shaw2004-02-261-8/+11
| | | | | | | 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.
* * gpgkeys_ldap.c (delete_one_attr): Removed. (make_one_attr): DeleteDavid Shaw2004-02-241-79/+75
| | | | | | | | 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.
* * gpgkeys_ldap.c (delete_one_attr): New function to replace attributesDavid Shaw2004-02-231-9/+55
| | | | | | | | | 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.
* * gpgkeys_ldap.c (epoch2ldaptime): New. Converse of ldap2epochtime.David Shaw2004-02-221-57/+521
| | | | | | | | | | (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.
* * gpgkeys_ldap.c: Replacement prototypes for setenv and unsetenv.David Shaw2004-02-201-36/+51
| | | | | | | | | | (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).
* * gpgkeys_ldap.c (ldap2epochtime): LDAP timestamps are UTC, so do notDavid Shaw2004-02-191-10/+34
| | | | | | | 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.
* * Makefile.am: Add automake conditionals to symlink gpgkeys_ldaps toDavid Shaw2004-02-191-11/+125
| | | | | | | | | | 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.
* * gpgkeys_ldap.c (find_basekeyspacedn): New function to figure out whatDavid Shaw2004-02-191-63/+124
| | | | | | | | 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.
* * gpgkeys_ldap.c (ldap_to_gpg_err): Make sure that LDAP_OPT_ERROR_NUMBERDavid Shaw2004-02-181-1/+1
| | | | | | | is defined before we use it. * gpgkeys_mailto.in: Fix VERSION number.
* * gpgkeys_hkp.c (search_key): Catch a mangled input file (useful ifDavid Shaw2004-01-121-3/+4
| | | | | | | | 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.
* cleaned up RISC OS code and removed lots of unnecessary stuffStefan Bellon2003-12-281-8/+0
|
* * gpgkeys_hkp.c, gpgkeys_ldap.c: #include <getopt.h> if it is available.David Shaw2003-05-311-0/+6
| | | | | | | | | | 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.
* * gpgkeys_ldap.c (main), gpgkeys_hkp.c (main): Use new keyserver protocolDavid Shaw2002-11-181-1/+1
| | | | | version.
* * gpgkeys_ldap.c (get_key): The deduping code requires "pgpcertid", butDavid Shaw2002-11-141-2/+5
| | | | | that was not available when running without verbose on. Noted by Stefan.
* * gpgkeys_ldap.c (get_key): Fix typo in deduping code.David Shaw2002-11-101-1/+1
|
* * gpgkeys_ldap.c (key_in_keylist, add_key_to_keylist, free_keylist,David Shaw2002-11-051-198/+285
| | | | | | | 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.
* * gpgkeys_hkp.c (send_key), gpgkeys_ldap.c (send_key): Properly handle anDavid Shaw2002-11-041-8/+6
| | | | | input file that does not include any key data at all.
* * gpgkeys_hkp.c (main), gpgkeys_ldap.c (main): Add -V flag to outputDavid Shaw2002-10-241-1/+6
| | | | | protocol and program version.
* * gpgkeys_ldap.c (get_key): Don't print keysize unless it's >0.David Shaw2002-10-141-55/+62
| | | | | | (printquoted): Use %-encoding instead of \-encoding. (search_key): Use new keyserver key listing format.
* * gpgkeys_ldap.c (search_key, main): Make sure LDAP values are freed inDavid Shaw2002-10-091-6/+8
| | | | | case of error.
* * gpgkeys_ldap.c (fail_all): New function to unwind a keylist and errorDavid Shaw2002-10-091-4/+39
| | | | | | | | | | | | each item. (main): Call fail_all from here, as needed. Also add a NO_MEMORY error in an appropriate place and fix error return code. (ldap_err_to_gpg_err): Add KEYSERVER_UNREACHABLE. * gpgkeys_hkp.c (fail_all): New function to unwind a keylist and error each item. (main): Call fail_all from here. Also add a NO_MEMORY error in an appropriate place. (get_key): Use new UNREACHABLE error for network errors.
* From stable branchDavid Shaw2002-09-271-8/+3
| | | | | * gpgkeys_ldap.c (send_key): Removed non-constant initializers.
* * gpgkeys_ldap.c (ldap_err_to_gpg_err, ldap_to_gpg_err, send_key, get_key,David Shaw2002-09-241-33/+97
| | | | | | search_key, main): Some minor error reporting enhancements for use with GPA (show reasons for KEY FAILED).
* * gpgkeys_ldap.c (get_key): Some compilers (RISC OS, HPUX c89) don't likeDavid Shaw2002-09-091-8/+3
| | | | | using variables as array initializers.
* * gpgkeys_hkp.c (get_key, parse_hkp_index): Bring over latest code fromDavid Shaw2002-08-191-3/+3
| | | | | | | | g10/hkp.c. * gpgkeys_ldap.c (get_key): Fix cosmetic URL display problem (extra ":" at the end).
* RISC OS changes due to dynload removalStefan Bellon2002-08-031-2/+6
|
* * gpgkeys_ldap.c (send_key, get_key, main): Consult the server versionDavid Shaw2002-07-151-10/+28
| | | | | string to determine whether to use pgpKey or pgpKeyV2.
* * gpgkeys_ldap.c (get_key), gpgkeys_hkp.c (get_key): Display keyserver URIDavid Shaw2002-07-041-3/+4
| | | | | as a URI, but only if verbose.
* * gpgkeys_hkp.c (parse_hkp_index): Error if the keyserver returns anDavid Shaw2002-07-011-4/+4
| | | | | | | | | | | unparseable HKP response. * gpgkeys_hkp.c (main): Warn on honor-http-proxy, broken-http-proxy, and include-subkeys (not supported yet). * gpgkeys_ldap.c (main), gpgkeys_hkp.c (http_connect, main): Fix some shadowing warnings.
* Update head to match stable 1.0David Shaw2002-06-291-0/+986