diff options
| author | Werner Koch <[email protected]> | 2019-11-26 12:09:35 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2019-11-26 12:09:35 +0000 |
| commit | 264c15c72fe050f5e8d2f1cb2444a459df6fe99f (patch) | |
| tree | aa2f381705526fdb8860026137174ba970a24207 /dirmngr/http.h | |
| parent | dirmngr: Make building with a TLS library mandatory (diff) | |
| download | gnupg-264c15c72fe050f5e8d2f1cb2444a459df6fe99f.tar.gz gnupg-264c15c72fe050f5e8d2f1cb2444a459df6fe99f.zip | |
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 <[email protected]>
Diffstat (limited to 'dirmngr/http.h')
| -rw-r--r-- | dirmngr/http.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/dirmngr/http.h b/dirmngr/http.h index 01546374e..31e3a880a 100644 --- a/dirmngr/http.h +++ b/dirmngr/http.h @@ -51,10 +51,11 @@ struct parsed_uri_s char *original; /* Unmodified copy of the parsed URI. */ char *scheme; /* Pointer to the scheme string (always lowercase). */ unsigned int is_http:1; /* This is a HTTP style URI. */ + unsigned int is_ldap:1; /* This is a LDAP style URI. */ unsigned int use_tls:1; /* Whether TLS should be used. */ - unsigned int opaque:1;/* Unknown scheme; PATH has the rest. */ - unsigned int v6lit:1; /* Host was given as a literal v6 address. */ - unsigned int onion:1; /* .onion address given. */ + unsigned int opaque:1; /* Unknown scheme; PATH has the rest. */ + unsigned int v6lit:1; /* Host was given as a literal v6 address. */ + unsigned int onion:1; /* .onion address given. */ unsigned int explicit_port :1; /* The port was explicitly specified. */ char *auth; /* username/password for basic auth. */ char *host; /* Host (converted to lowercase). */ |
