Werner Koch
864ea25198
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>
(cherry picked from commit 39815c023f0371dea01f7c51469b19c06ad18718)
2021-06-16 12:58:32 +02:00
..
2018-10-25 16:53:05 -04:00
2018-10-24 15:56:18 -04:00
2021-03-15 09:50:31 +01: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
2021-05-20 13:38:24 +02:00
2016-09-17 15:57:31 +09:00
2021-06-16 12:58:32 +02:00
2021-06-16 12:58:32 +02:00
2021-06-16 12:58:32 +02:00
2020-11-11 15:23:22 +01:00
2010-07-16 13:19:45 +00:00
2018-07-25 14:35:04 +02:00
2021-06-16 12:43:11 +02:00
2021-06-16 12:25:13 +02:00
2021-01-19 10:33:03 +01:00
2019-11-12 20:35:12 +01:00
2020-08-19 15:16:34 +09:00
2020-05-20 19:44:38 +09:00
2019-04-02 13:22:32 +02:00
2017-03-03 17:17:26 +01:00
2017-03-02 18:35:03 +01:00
2020-09-10 10:50:39 +02:00
2021-06-16 11:54:47 +02:00
2021-06-16 11:54:47 +02:00
2021-06-16 12:25:13 +02:00
2021-04-16 20:21:23 +02:00
2018-07-25 14:35:04 +02:00
2021-06-16 11:54:47 +02:00
2019-11-18 18:26:55 +01:00
2017-03-07 20:25:54 +09:00
2021-06-16 12:58:32 +02:00
2018-04-25 12:38:04 +02:00
2021-06-16 12:58:32 +02:00
2021-06-16 12:58:32 +02:00
2021-02-17 17:40:02 +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
2021-06-16 12:58:32 +02:00
2019-11-11 20:49:04 +01:00
2021-06-16 12:58:32 +02:00
2021-06-16 12:25:13 +02:00
2021-06-16 12:25:13 +02:00
2020-09-18 10:20:23 +09:00
2021-06-16 12:58:32 +02:00
2018-11-05 09:00:02 +01:00
2017-03-02 18:35:03 +01:00
2011-02-04 12:57:53 +01:00
2021-05-20 14:33:35 +02:00
2010-06-09 16:53:51 +00:00
2011-02-04 12:57:53 +01:00
2021-06-16 12:58:32 +02:00
2014-05-05 16:23:37 +02:00
2018-07-25 14:35:04 +02:00
2018-11-22 22:36:07 +01:00
2021-06-16 11:54:47 +02:00
2021-06-16 12:58:32 +02:00
2019-11-26 13:09:35 +01:00
2018-07-25 14:35:04 +02:00
2021-06-16 12:58:32 +02:00
2015-10-18 20:08:26 +02:00
2020-04-15 11:06:59 +02:00
2017-02-21 14:55:04 +01:00
2016-11-05 12:02:19 +01:00
2020-02-18 18:07:46 -05:00