Werner Koch
39815c023f
dirmngr: Rewrite the LDAP wrapper tool
* 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 <wk@gnupg.org>
2021-06-08 08:51:11 +02:00
..
2010-12-14 19:17:58 +00:00
2017-05-10 11:13:12 +09:00
2021-04-29 19:45:00 +02:00
2017-09-18 22:49:05 +02:00
2017-02-21 13:11:46 -05:00
2015-04-20 18:20:45 +02:00
2020-10-23 11:24:09 +02:00
2016-09-17 15:57:31 +09:00
2021-06-08 08:51:11 +02:00
2021-06-08 08:51:11 +02:00
2021-06-08 08:51:11 +02:00
2020-12-04 12:12:20 +01:00
2010-07-16 13:19:45 +00:00
2019-11-18 18:44:30 +01:00
2020-10-02 17:04:12 +02:00
2021-05-26 19:06:36 +02:00
2021-05-26 14:48:27 +02:00
2020-10-02 17:04:12 +02:00
2019-11-18 18:44:28 +01:00
2019-11-12 20:31:34 +01:00
2020-05-21 14:37:03 +09:00
2020-05-21 14:37:03 +09:00
2019-04-02 13:25:48 +02:00
2017-03-03 17:17:26 +01:00
2017-03-02 18:35:03 +01:00
2020-09-10 11:04:15 +02:00
2021-05-26 10:02:49 +02:00
2021-05-26 10:02:49 +02:00
2021-05-26 14:48:27 +02:00
2021-05-03 20:28:33 +02:00
2017-06-08 09:37:36 +02:00
2021-05-26 10:02:49 +02:00
2019-11-18 18:44:36 +01:00
2017-03-07 20:25:54 +09:00
2021-06-08 08:51:11 +02:00
2018-04-25 12:38:04 +02:00
2021-06-08 08:51:11 +02:00
2021-06-08 08:51:11 +02:00
2021-02-17 17:31:36 +01:00
2017-03-07 20:25:54 +09:00
2014-03-07 19:00:31 +01:00
2010-06-09 16:53:51 +00:00
2018-04-27 12:05:31 +02:00
2021-06-08 08:51:11 +02:00
2016-11-05 12:02:19 +01:00
2021-06-08 08:51:11 +02:00
2021-05-26 14:48:27 +02:00
2021-05-26 14:48:27 +02:00
2018-04-25 12:38:04 +02:00
2021-06-08 08:51:11 +02:00
2020-05-12 18:51:47 +02:00
2017-03-02 18:35:03 +01:00
2011-02-04 12:57:53 +01:00
2020-04-15 15:45:34 +02:00
2010-06-09 16:53:51 +00:00
2011-02-04 12:57:53 +01:00
2021-06-08 08:51:11 +02:00
2014-05-05 16:23:37 +02:00
2017-03-07 20:25:54 +09:00
2018-11-23 09:23:26 +01:00
2021-05-26 10:02:49 +02:00
2021-06-08 08:51:11 +02:00
2016-11-05 12:02:19 +01:00
2019-11-18 18:44:30 +01:00
2021-06-08 08:51:11 +02:00
2015-10-18 20:08:26 +02:00
2020-04-15 15:45:58 +02:00
2017-02-21 14:55:04 +01:00
2016-11-05 12:02:19 +01:00
2017-12-11 11:30:45 +01:00