summaryrefslogtreecommitdiffstats
path: root/apps/cmp.c
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2021-01-28 22:10:47 +0100
committerDr. David von Oheimb <dev@ddvo.net>2021-03-01 10:30:43 +0100
commit7932982b88f5095f60397fe727d27ddf7234f4d6 (patch)
tree791fa288ead387d06147ae627169996e093c115d /apps/cmp.c
parente60e974414a7e637ff2f946dc2aa24c381a32cc2 (diff)
OSSL_HTTP_parse_url(): Handle any userinfo, query, and fragment components
Now handle [http[s]://][userinfo@]host[:port][/path][?query][#frag] by optionally providing any userinfo, query, and frag components. All usages of this function, which are client-only, silently ignore userinfo and frag components, while the query component is taken as part of the path. Update and extend the unit tests and all affected documentation. Document and deprecat OCSP_parse_url(). Fixes an issue that came up when discussing FR #14001. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14009)
Diffstat (limited to 'apps/cmp.c')
-rw-r--r--apps/cmp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/cmp.c b/apps/cmp.c
index 5778fd95a7..d04af4177b 100644
--- a/apps/cmp.c
+++ b/apps/cmp.c
@@ -1855,7 +1855,8 @@ static int setup_client_ctx(OSSL_CMP_CTX *ctx, ENGINE *engine)
CMP_err("missing -server option");
goto err;
}
- if (!OSSL_HTTP_parse_url(opt_server, &server, &port, &portnum, &path, &ssl)) {
+ if (!OSSL_HTTP_parse_url(opt_server, &ssl, NULL /* user */, &server, &port,
+ &portnum, &path, NULL /* q */, NULL /* frag */)) {
CMP_err1("cannot parse -server URL: %s", opt_server);
goto err;
}