aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/ldap-misc.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-04-04dirmngr: Return modifyTimestamp and add server option --newer.Werner Koch1-0/+2
* dirmngr/server.c (cmd_ks_get): Add option --newer. (cmd_ad_query): Ditto. * dirmngr/ldap-misc.c (isotime2rfc4517): New. (rfc4517toisotime): New. * dirmngr/ks-action.c (ks_action_get): Add arg newer and pass on. (ks_action_query): Ditto. * dirmngr/ks-engine-ldap.c (extract_keys): Print new "chg" record. (ks_ldap_get): Add arg newer. Modify filter with newer arg. (ks_ldap_search): Print the modifyTimestamp. (ks_ldap_query): Add arg newer. Modify filter with newer arg. -- Note that the modifyTimestamp is also available on Windows, where its value is more commonly known as whenChanged. Both are constructed attributes. Note that the --newer option is a bit of a misnomer because LDAP has only a greater-or-equal and no greater-than operator.
2021-06-16dirmngr: Rewrite the LDAP wrapper toolWerner Koch1-9/+23
* dirmngr/ldap-misc.c: New. * dirmngr/ldap-misc.h: New. * dirmngr/ks-engine-ldap.c: Include ldap-misc.h. (ldap_err_to_gpg_err, ldap_to_gpg_err): Move to ldap-misc.c. * dirmngr/ldap-wrapper.c (ldap_wrapper): Print list of args in debug mode. * dirmngr/server.c (lookup_cert_by_pattern): Handle GPG_ERR_NOT_FOUND the saqme as GPG_ERR_NO_DATA. * dirmngr/ldap.c (run_ldap_wrapper): Add args tls_mode and ntds. Remove arg url. Adjust for changes in dirmngr_ldap. (url_fetch_ldap): Remove args host and port. Parse the URL and use these values to call run_ldap_wrapper. (attr_fetch_ldap): Pass tls flags to run_ldap_wrapper. (rfc2254_need_escape, rfc2254_escape): New. (extfilt_need_escape, extfilt_escape): New. (parse_one_pattern): Rename to ... (make_one_filter): this. Change for new dirmngr_ldap calling convention. Make issuer DN searching partly work. (escape4url, make_url): Remove. (start_cert_fetch_ldap): Change for new dirmngr_ldap calling convention. * dirmngr/dirmngr_ldap.c: Major rewrite. * dirmngr/t-ldap-misc.c: New. * dirmngr/t-support.h (DIM, DIMof): New. * dirmngr/Makefile.am (dirmngr_ldap_SOURCES): Add ldap-misc.c (module_tests) [USE_LDAP]: Add t-ldap-misc. (t_ldap_parse_uri_SOURCES): Ditto. (t_ldap_misc_SOURCES): New. -- This rewrite allows to properly handle TLS and avoids some code duplication. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 39815c023f0371dea01f7c51469b19c06ad18718)
2019-07-11gpg: Fix getting User ID.NIIBE Yutaka1-0/+1
* g10/getkey.c (user_id_db): Remove, as no use anymore. (get_user_id_string): Use cache_get_uid_bykid. (get_user_id_byfpr): Use cache_get_uid_byfpr. * g10/objcache.c (cache_get_uid_byfpr): New. * g10/objcache.h (cache_get_uid_byfpr): New. Fixes-commit: 64a5fd37271a3e454c0d59ac3500e1a1b232e4f7 Signed-off-by: NIIBE Yutaka <[email protected]>
2019-04-13gpg: New caching functions.Werner Koch1-6/+9
* g10/objcache.c: New. * g10/objcache.h: New. * g10/Makefile.am (common_source): Add them. * g10/gpg.c: Include objcache.h. (g10_exit): Call objcache_dump_stats. * g10/getkey.c: Include objcache.h. (get_primary_uid, release_keyid_list): Remove. (cache_user_id): Remove. (finish_lookup): Call the new cache_put_keyblock instead of cache_user_id. (get_user_id_string): Remove code for mode 2. (get_user_id): Implement using cache_get_uid_bykid. -- This generic caching module is better than the ad-hoc code we used in getkey.c. More cleanup in getkey is still required but it is a start. There is also a small performance increase with the new cache: With a large keyring and --list-sigs I get these numbers: | | before | after | |------+------------+------------| | real | 14m1.028s | 12m16.186s | | user | 2m18.484s | 1m36.040s | | sys | 11m42.420s | 10m40.044s | Note the speedup in the user time which is due to the improved cache algorithm. This is obvious, because the old cache was just a long linked list; the new cache are two hash tables. Signed-off-by: Werner Koch <[email protected]>
2017-03-02dirmngr: Rearrange files to fix de6d831.Werner Koch1-8/+6
* dirmngr/http-common.c: New. * dirmngr/http-common.h: New. * dirmngr/Makefile.am (dirmngr_SOURCES): Add them. (t_http_SOURCES): Add them. (t_ldap_parse_uri_SOURCES): Add them. * dirmngr/misc.c (get_default_keyserver): Move to ... * dirmngr/http-common.c: here. * dirmngr/http.c: Include http-common.h instead of misc.h. * dirmngr/http-ntbtls.c: Ditto. Signed-off-by: Werner Koch <[email protected]>
2016-11-05Change all http://www.gnu.org in license notices to https://Werner Koch1-1/+1
--
2011-12-15scd: Add option --dump-atr to command APDU.Werner Koch1-1/+1
* scd/atr.c: Rewrite. * scd/Makefile.am (scdaemon_SOURCES): Add atr.c and atr.h. * scd/command.c (cmd_apdu): Add option --dump-atr.
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2006-06-20Updated FSF's address.Werner Koch1-1/+2
2005-07-27Removed directories which are only used by the 1.9 branchWerner Koch1-28/+0
2003-06-05This commit was manufactured by cvs2svn to create branchRepo Admin1-10/+9
'GNUPG-1-9-BRANCH'.
2003-01-09This commit was manufactured by cvs2svn to create branchRepo Admin1-15/+4
'GNUPG-1-9-BRANCH'.
2002-07-22* fseeko.c, ftello.c: New.Werner Koch1-9/+17
* configure.ac: Check for ftello and provide a replacement.
2001-11-24Added new directory common to enable sharing of some code and errorWerner Koch1-59/+0
numbers between gpg, gpgsm and gpg-agent. Move some files and code to there.
2001-11-13We have reached a state where we are able to import certs andWerner Koch1-2/+52
check the certification path.
2001-11-07Implemented server main loop and started with import command.Werner Koch1-3/+17
2001-11-07Assuan server mode is now basically usableWerner Koch1-19/+2
2001-11-06First chunk of code for the Assuan libraryWerner Koch1-8/+22
2000-07-14See ChangeLog: Fri Jul 14 19:38:23 CEST 2000 Werner KochWerner Koch1-1/+1
2000-01-27See ChangeLog: Thu Jan 27 18:00:44 CET 2000 Werner KochWerner Koch1-3/+3
1999-03-20See ChangeLog: Sat Mar 20 11:53:40 CET 1999 Werner KochWerner Koch1-0/+1
1999-01-19See ChangeLog: Tue Jan 19 19:34:58 CET 1999 Werner KochWerner Koch1-0/+1
1999-01-16See ChangeLog: Sat Jan 16 09:27:30 CET 1999 Werner KochWerner Koch1-20/+6
1998-12-23See ChangeLog: Wed Dec 23 13:34:22 CET 1998 Werner KochWerner Koch1-3/+3
1998-07-06intermediate releaseWerner Koch1-9/+21
1998-06-16some more internall structure changesWerner Koch1-4/+4
1997-12-16added some stuff for signing keysWerner Koch1-0/+1
1997-11-18initially checkinWerner Koch1-0/+29