Home GnuPG
Diffusion GnuPG 264c15c72fe0

dirmngr: Rework of the LDAP code, part 1.

Description

dirmngr: Rework of the LDAP code, part 1.

* dirmngr/http.h (struct parsed_uri_s): Add flag is_ldap.
* dirmngr/http.c (do_parse_uri): Set flag.  Do not error out for a
missing slashes in an http scheme if NO_SCHEME_CHECK is active.
* dirmngr/t-http.c (main): Print new flag.
* dirmngr/ks-engine-ldap.c (ks_ldap_help): Use flag instead of
checking the scheme.
* dirmngr/ldap-parse-uri.c (ldap_uri_p): Re-implement using
http_parse_uri.
* dirmngr/t-ldap-parse-uri.c (main): Add option --verbose.

This patch merely remove the separate parser for checking for an LDAP
scheme. It is better to let our generic URI parser handle this. Also
fixes this bug

|| url[4] == 'i' || url[4] == 'i')

to make the rarely used ldapi scheme case-insensitive.

More changes to the LDAP code are planned.

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Nov 26 2019, 1:09 PM
Parents
rG1009e4e5f713: dirmngr: Make building with a TLS library mandatory
Branches
Unknown
Tags
Unknown