Add a test case for OSSL_HTTP_parse_url

Ensure we test the case where the port value is empty in the URL.

Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/22961)
This commit is contained in:
Matt Caswell 2023-12-06 12:51:34 +00:00
parent 322517d817
commit a36d10dfb7
1 changed files with 2 additions and 1 deletions

View File

@ -347,7 +347,8 @@ static int test_http_url_invalid_prefix(void)
static int test_http_url_invalid_port(void)
{
return test_http_url_invalid("https://1.2.3.4:65536/pkix");
return test_http_url_invalid("https://1.2.3.4:65536/pkix")
&& test_http_url_invalid("https://1.2.3.4:");
}
static int test_http_url_invalid_path(void)