From: Amir Mohammadi Date: Wed, 4 Aug 2021 05:14:29 +0000 (+0430) Subject: Fix test case for a2i_IPADDRESS X-Git-Tag: OpenSSL_1_1_1r~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3b0279bda7bf4f0f81a3dba952698fa68a51639;p=thirdparty%2Fopenssl.git Fix test case for a2i_IPADDRESS (cherry picked from commit 9b887d5d5a8ef9aa1c3ce6e54a82ddcba25b9415) Reviewed-by: Tomas Mraz Reviewed-by: Dmitry Belyavskiy Reviewed-by: Hugo Landau (Merged from https://github.com/openssl/openssl/pull/18847) --- diff --git a/test/x509_internal_test.c b/test/x509_internal_test.c index 3eec9703528..63f350f74bb 100644 --- a/test/x509_internal_test.c +++ b/test/x509_internal_test.c @@ -61,7 +61,6 @@ typedef struct { const char *ipasc; const char *data; int length; - ASN1_OCTET_STRING ip; } IP_TESTDATA; static IP_TESTDATA a2i_ipaddress_tests[] = { @@ -81,8 +80,10 @@ static IP_TESTDATA a2i_ipaddress_tests[] = { {"example.test", NULL, 0}, {"", NULL, 0}, + {"1.2.3.4 ", "\x01\x02\x03\x04", 4}, + {" 1.2.3.4", "\x01\x02\x03\x04", 4}, + {" 1.2.3.4 ", "\x01\x02\x03\x04", 4}, {"1.2.3.4.example.test", NULL, 0}, - {"1.2.3.4 ", NULL, 0}, };