Fix compile issues in test/v3ext.c with no-rfc3779
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Fri, 17 Jun 2022 08:25:24 +0000 (10:25 +0200)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Thu, 23 Jun 2022 17:24:57 +0000 (19:24 +0200)
There are no ASIdentifiers if OPENSSL_NO_RFC3779 is defined,
therefore the test cannot be compiled.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18634)

test/v3ext.c

index 0d371ec280f1bcf168358581da64465366af9d64..29e33d16a5fae606234d31302faba3adaccc8cba 100644 (file)
@@ -37,6 +37,7 @@ end:
     return ret;
 }
 
+#ifndef OPENSSL_NO_RFC3779
 static int test_asid(void)
 {
     ASN1_INTEGER *val1 = NULL, *val2 = NULL;
@@ -113,6 +114,7 @@ static int test_asid(void)
     ASIdentifiers_free(asid4);
     return testresult;
 }
+#endif /* OPENSSL_NO_RFC3779 */
 
 OPT_TEST_DECLARE_USAGE("cert.pem\n")
 
@@ -127,6 +129,8 @@ int setup_tests(void)
         return 0;
 
     ADD_TEST(test_pathlen);
+#ifndef OPENSSL_NO_RFC3779
     ADD_TEST(test_asid);
+#endif /* OPENSSL_NO_RFC3779 */
     return 1;
 }