1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

dirmngr: Support pseudo URI scheme "opaque".

* dirmngr/http.h (HTTP_PARSE_NO_SCHEME_CHECK): New.
* dirmngr/http.c (http_parse_uri): Use this flag.  Change all callers
to use the new macro for better readability.
(do_parse_uri): Add pseudo scheme "opaque".
(uri_query_value): New.
--

This scheme can be used to convey arbitrary strings in a parsed_uri_t
object.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2021-05-25 16:08:56 +02:00
parent 44c8232b97
commit 72124fadaf
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
7 changed files with 36 additions and 18 deletions

View file

@ -70,6 +70,7 @@ struct parsed_uri_s
typedef struct parsed_uri_s *parsed_uri_t;
struct uri_tuple_s *uri_query_lookup (parsed_uri_t uri, const char *key);
const char *uri_query_value (parsed_uri_t url, const char *key);
typedef enum
{
@ -150,8 +151,9 @@ void http_session_set_log_cb (http_session_t sess,
void http_session_set_timeout (http_session_t sess, unsigned int timeout);
#define HTTP_PARSE_NO_SCHEME_CHECK 1
gpg_error_t http_parse_uri (parsed_uri_t *ret_uri, const char *uri,
int no_scheme_check);
unsigned int flags);
void http_release_parsed_uri (parsed_uri_t uri);