From: Matt Caswell Date: Wed, 6 Dec 2023 12:51:34 +0000 (+0000) Subject: Add a test case for OSSL_HTTP_parse_url X-Git-Tag: openssl-3.1.5~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54c7f928f3bfb1b9277ff462c1749a93c7fbd07b;p=thirdparty%2Fopenssl.git 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 Reviewed-by: Tomas Mraz Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/22961) (cherry picked from commit a36d10dfb7e77614c8d3da602ff3800a2e9f4989) --- diff --git a/test/http_test.c b/test/http_test.c index b9f7452744c..b6897a17fdd 100644 --- a/test/http_test.c +++ b/test/http_test.c @@ -298,7 +298,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)