test cleanup: move helper .c and .h files to test/helpers/
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Sun, 29 Nov 2020 11:40:10 +0000 (12:40 +0100)
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>
Tue, 1 Dec 2020 06:49:38 +0000 (07:49 +0100)
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13568)

42 files changed:
test/asynciotest.c
test/build.info
test/cmp_asn_test.c
test/cmp_client_test.c
test/cmp_ctx_test.c
test/cmp_hdr_test.c
test/cmp_msg_test.c
test/cmp_protect_test.c
test/cmp_server_test.c
test/cmp_status_test.c
test/cmp_vfy_test.c
test/dtls_mtu_test.c
test/dtlstest.c
test/endecode_test.c
test/evp_test.c
test/evp_test.h [deleted file]
test/fatalerrtest.c
test/gosttest.c
test/helpers/cmp_testlib.c [moved from test/cmp_testlib.c with 100% similarity]
test/helpers/cmp_testlib.h [moved from test/cmp_testlib.h with 95% similarity]
test/helpers/handshake.c [moved from test/handshake_helper.c with 99% similarity]
test/helpers/handshake.h [moved from test/handshake_helper.h with 100% similarity]
test/helpers/pkcs12.c [moved from test/pkcs12_helper.c with 99% similarity]
test/helpers/pkcs12.h [moved from test/pkcs12_helper.h with 99% similarity]
test/helpers/predefined_dhparams.c [moved from test/predefined_dhparams.c with 100% similarity]
test/helpers/predefined_dhparams.h [moved from test/predefined_dhparams.h with 100% similarity]
test/helpers/ssl_test_ctx.c [moved from test/ssl_test_ctx.c with 99% similarity]
test/helpers/ssl_test_ctx.h [moved from test/ssl_test_ctx.h with 100% similarity]
test/helpers/ssltestlib.c [moved from test/ssltestlib.c with 99% similarity]
test/helpers/ssltestlib.h [moved from test/ssltestlib.h with 100% similarity]
test/pkcs12_format_test.c
test/recipes/80-test_ssl_old.t
test/recordlentest.c
test/servername_test.c
test/ssl_old_test.c [moved from test/ssltest_old.c with 99% similarity]
test/ssl_test.c
test/ssl_test_ctx_test.c
test/sslapitest.c
test/sslbuffertest.c
test/sslcorrupttest.c
test/testutil/output.c [moved from test/testutil/output_helpers.c with 100% similarity]
test/tls13ccstest.c

index 4147ee128c7ea2688d76574cb98e2d04180d351c..10c958f667fbdeb791cd8df4fb597db8a48a476d 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "internal/packet.h"
 
-#include "ssltestlib.h"
+#include "helpers/ssltestlib.h"
 #include "testutil.h"
 
 /* Should we fragment records or not? 0 = no, !0 = yes*/
index d781b1039303aaa2e7a00cfcec208e77e7e003d9..463e3cd2620e5f35c42264dcba65863d39cc5464 100644 (file)
@@ -18,7 +18,7 @@ $LIBAPPSSRC=../apps/lib/opt.c $AUXLIBAPPSSRC
 
 IF[{- !$disabled{tests} -}]
   LIBS{noinst,has_main}=libtestutil.a
-  SOURCE[libtestutil.a]=testutil/basic_output.c testutil/output_helpers.c \
+  SOURCE[libtestutil.a]=testutil/basic_output.c testutil/output.c \
           testutil/driver.c testutil/tests.c testutil/cb.c testutil/stanza.c \
           testutil/format_output.c \
           testutil/test_cleanup.c testutil/main.c testutil/testutil_init.c \
@@ -122,11 +122,11 @@ IF[{- !$disabled{tests} -}]
   INCLUDE[exptest]=../include ../apps/include
   DEPEND[exptest]=../libcrypto libtestutil.a
 
-  SOURCE[fatalerrtest]=fatalerrtest.c ssltestlib.c
+  SOURCE[fatalerrtest]=fatalerrtest.c helpers/ssltestlib.c
   INCLUDE[fatalerrtest]=../include ../apps/include
   DEPEND[fatalerrtest]=../libcrypto ../libssl libtestutil.a
 
-  SOURCE[tls13ccstest]=tls13ccstest.c ssltestlib.c
+  SOURCE[tls13ccstest]=tls13ccstest.c helpers/ssltestlib.c
   INCLUDE[tls13ccstest]=../include ../apps/include
   DEPEND[tls13ccstest]=../libcrypto ../libssl libtestutil.a
 
@@ -242,7 +242,7 @@ IF[{- !$disabled{tests} -}]
   INCLUDE[memleaktest]=../include ../apps/include
   DEPEND[memleaktest]=../libcrypto libtestutil.a
 
-  SOURCE[pkcs12_format_test]=pkcs12_format_test.c pkcs12_helper.c
+  SOURCE[pkcs12_format_test]=pkcs12_format_test.c helpers/pkcs12.c
   INCLUDE[pkcs12_format_test]=../include ../apps/include
   DEPEND[pkcs12_format_test]=../libcrypto libtestutil.a
 
@@ -274,11 +274,11 @@ IF[{- !$disabled{tests} -}]
   INCLUDE[d2i_test]=../include ../apps/include
   DEPEND[d2i_test]=../libcrypto libtestutil.a
 
-  SOURCE[ssl_test_ctx_test]=ssl_test_ctx_test.c ssl_test_ctx.c
+  SOURCE[ssl_test_ctx_test]=ssl_test_ctx_test.c helpers/ssl_test_ctx.c
   INCLUDE[ssl_test_ctx_test]=../include ../apps/include
   DEPEND[ssl_test_ctx_test]=../libcrypto ../libssl libtestutil.a
 
-  SOURCE[ssl_test]=ssl_test.c ssl_test_ctx.c handshake_helper.c
+  SOURCE[ssl_test]=ssl_test.c helpers/ssl_test_ctx.c helpers/handshake.c
   INCLUDE[ssl_test]=../include ../apps/include
   DEPEND[ssl_test]=../libcrypto ../libssl libtestutil.a
 
@@ -286,17 +286,17 @@ IF[{- !$disabled{tests} -}]
   INCLUDE[cipherlist_test]=../include ../apps/include
   DEPEND[cipherlist_test]=../libcrypto ../libssl libtestutil.a
 
-  INCLUDE[ssl_test_ctx.o]=../include
-  INCLUDE[handshake_helper.o]=.. ../include
-  INCLUDE[pkcs12_helper.o]=.. ../include
-  INCLUDE[ssltestlib.o]=.. ../include
-  INCLUDE[cmp_testlib.o]=.. ../include ../apps/include
+  INCLUDE[helpers/ssl_test_ctx.o]=../include
+  INCLUDE[helpers/handshake.o]=.. ../include
+  INCLUDE[helpers/pkcs12.o]=.. ../include
+  INCLUDE[helpers/ssltestlib.o]=.. ../include
+  INCLUDE[helpers/cmp_testlib.o]=.. ../include ../apps/include
 
   SOURCE[x509aux]=x509aux.c
   INCLUDE[x509aux]=../include ../apps/include
   DEPEND[x509aux]=../libcrypto libtestutil.a
 
-  SOURCE[asynciotest]=asynciotest.c ssltestlib.c
+  SOURCE[asynciotest]=asynciotest.c helpers/ssltestlib.c
   INCLUDE[asynciotest]=../include ../apps/include
   DEPEND[asynciotest]=../libcrypto ../libssl libtestutil.a
 
@@ -324,7 +324,7 @@ IF[{- !$disabled{tests} -}]
   INCLUDE[param_build_test]=../include ../apps/include
   DEPEND[param_build_test]=../libcrypto.a libtestutil.a
 
-  SOURCE[sslapitest]=sslapitest.c ssltestlib.c filterprov.c tls-provider.c
+  SOURCE[sslapitest]=sslapitest.c helpers/ssltestlib.c filterprov.c tls-provider.c
   INCLUDE[sslapitest]=../include ../apps/include ..
   DEPEND[sslapitest]=../libcrypto ../libssl libtestutil.a
 
@@ -344,11 +344,11 @@ IF[{- !$disabled{tests} -}]
   INCLUDE[http_test]=../include ../apps/include
   DEPEND[http_test]=../libcrypto libtestutil.a
 
-  SOURCE[dtlstest]=dtlstest.c ssltestlib.c
+  SOURCE[dtlstest]=dtlstest.c helpers/ssltestlib.c
   INCLUDE[dtlstest]=../include ../apps/include
   DEPEND[dtlstest]=../libcrypto ../libssl libtestutil.a
 
-  SOURCE[sslcorrupttest]=sslcorrupttest.c ssltestlib.c
+  SOURCE[sslcorrupttest]=sslcorrupttest.c helpers/ssltestlib.c
   INCLUDE[sslcorrupttest]=../include ../apps/include
   DEPEND[sslcorrupttest]=../libcrypto ../libssl libtestutil.a
 
@@ -376,7 +376,7 @@ IF[{- !$disabled{tests} -}]
   INCLUDE[x509_time_test]=../include ../apps/include
   DEPEND[x509_time_test]=../libcrypto libtestutil.a
 
-  SOURCE[recordlentest]=recordlentest.c ssltestlib.c
+  SOURCE[recordlentest]=recordlentest.c helpers/ssltestlib.c
   INCLUDE[recordlentest]=../include ../apps/include
   DEPEND[recordlentest]=../libcrypto ../libssl libtestutil.a
 
@@ -412,7 +412,7 @@ IF[{- !$disabled{tests} -}]
   INCLUDE[http_test]=../include ../apps/include
   DEPEND[http_test]=../libcrypto libtestutil.a
 
-  SOURCE[servername_test]=servername_test.c ssltestlib.c
+  SOURCE[servername_test]=servername_test.c helpers/ssltestlib.c
   INCLUDE[servername_test]=../include ../apps/include
   DEPEND[servername_test]=../libcrypto ../libssl libtestutil.a
 
@@ -425,7 +425,7 @@ IF[{- !$disabled{tests} -}]
 
   IF[{- !$disabled{psk} -}]
     PROGRAMS{noinst}=dtls_mtu_test
-    SOURCE[dtls_mtu_test]=dtls_mtu_test.c ssltestlib.c
+    SOURCE[dtls_mtu_test]=dtls_mtu_test.c helpers/ssltestlib.c
     INCLUDE[dtls_mtu_test]=.. ../include ../apps/include
     DEPEND[dtls_mtu_test]=../libcrypto ../libssl libtestutil.a
   ENDIF
@@ -477,39 +477,39 @@ IF[{- !$disabled{tests} -}]
                      cmp_server_test cmp_client_test
   ENDIF
 
-  SOURCE[cmp_asn_test]=cmp_asn_test.c cmp_testlib.c
+  SOURCE[cmp_asn_test]=cmp_asn_test.c helpers/cmp_testlib.c
   INCLUDE[cmp_asn_test]=.. ../include ../apps/include
   DEPEND[cmp_asn_test]=../libcrypto.a libtestutil.a
 
-  SOURCE[cmp_ctx_test]=cmp_ctx_test.c cmp_testlib.c
+  SOURCE[cmp_ctx_test]=cmp_ctx_test.c helpers/cmp_testlib.c
   INCLUDE[cmp_ctx_test]=.. ../include ../apps/include
   DEPEND[cmp_ctx_test]=../libcrypto.a libtestutil.a
 
-  SOURCE[cmp_hdr_test]=cmp_hdr_test.c cmp_testlib.c
+  SOURCE[cmp_hdr_test]=cmp_hdr_test.c helpers/cmp_testlib.c
   INCLUDE[cmp_hdr_test]=.. ../include ../apps/include
   DEPEND[cmp_hdr_test]=../libcrypto.a libtestutil.a
 
-  SOURCE[cmp_status_test]=cmp_status_test.c cmp_testlib.c
+  SOURCE[cmp_status_test]=cmp_status_test.c helpers/cmp_testlib.c
   INCLUDE[cmp_status_test]=.. ../include ../apps/include
   DEPEND[cmp_status_test]=../libcrypto.a libtestutil.a
 
-  SOURCE[cmp_protect_test]=cmp_protect_test.c cmp_testlib.c
+  SOURCE[cmp_protect_test]=cmp_protect_test.c helpers/cmp_testlib.c
   INCLUDE[cmp_protect_test]=.. ../include ../apps/include
   DEPEND[cmp_protect_test]=../libcrypto.a libtestutil.a
 
-  SOURCE[cmp_msg_test]=cmp_msg_test.c cmp_testlib.c
+  SOURCE[cmp_msg_test]=cmp_msg_test.c helpers/cmp_testlib.c
   INCLUDE[cmp_msg_test]=.. ../include ../apps/include
   DEPEND[cmp_msg_test]=../libcrypto.a libtestutil.a
 
-  SOURCE[cmp_vfy_test]=cmp_vfy_test.c cmp_testlib.c
+  SOURCE[cmp_vfy_test]=cmp_vfy_test.c helpers/cmp_testlib.c
   INCLUDE[cmp_vfy_test]=.. ../include ../apps/include
   DEPEND[cmp_vfy_test]=../libcrypto.a libtestutil.a
 
-  SOURCE[cmp_server_test]=cmp_server_test.c cmp_testlib.c
+  SOURCE[cmp_server_test]=cmp_server_test.c helpers/cmp_testlib.c
   INCLUDE[cmp_server_test]=.. ../include ../apps/include
   DEPEND[cmp_server_test]=../libcrypto.a libtestutil.a
 
-  SOURCE[cmp_client_test]=cmp_client_test.c cmp_testlib.c ../apps/cmp_mock_srv.c
+  SOURCE[cmp_client_test]=cmp_client_test.c helpers/cmp_testlib.c ../apps/cmp_mock_srv.c
   INCLUDE[cmp_client_test]=.. ../include ../apps/include
   DEPEND[cmp_client_test]=../libcrypto.a libtestutil.a
 
@@ -526,7 +526,7 @@ IF[{- !$disabled{tests} -}]
                      rsa_sp800_56b_test bn_internal_test ecdsatest rsa_test \
                      rc2test rc4test rc5test hmactest ffc_internal_test \
                      asn1_dsa_internal_test dsatest dsa_no_digest_size_test \
-                     dhtest ssltest_old
+                     dhtest ssl_old_test
 
     IF[{- !$disabled{poly1305} -}]
       PROGRAMS{noinst}=poly1305_internal_test
@@ -700,9 +700,9 @@ IF[{- !$disabled{tests} -}]
     INCLUDE[mdc2_internal_test]=.. ../include ../apps/include
     DEPEND[mdc2_internal_test]=../libcrypto.a libtestutil.a
 
-    SOURCE[ssltest_old]=ssltest_old.c predefined_dhparams.c
-    INCLUDE[ssltest_old]=.. ../include ../apps/include
-    DEPEND[ssltest_old]=../libcrypto.a ../libssl.a
+    SOURCE[ssl_old_test]=ssl_old_test.c helpers/predefined_dhparams.c
+    INCLUDE[ssl_old_test]=.. ../include ../apps/include
+    DEPEND[ssl_old_test]=../libcrypto.a ../libssl.a
   ENDIF
 
   PROGRAMS{noinst}=asn1_time_test
@@ -722,7 +722,7 @@ IF[{- !$disabled{tests} -}]
     DEPEND[tls13secretstest]=../libcrypto ../libssl libtestutil.a
   ENDIF
 
-  SOURCE[sslbuffertest]=sslbuffertest.c ssltestlib.c
+  SOURCE[sslbuffertest]=sslbuffertest.c helpers/ssltestlib.c
   INCLUDE[sslbuffertest]=../include ../apps/include
   DEPEND[sslbuffertest]=../libcrypto ../libssl libtestutil.a
 
@@ -734,7 +734,7 @@ IF[{- !$disabled{tests} -}]
   INCLUDE[errtest]=../include ../apps/include
   DEPEND[errtest]=../libcrypto libtestutil.a
 
-  SOURCE[gosttest]=gosttest.c ssltestlib.c
+  SOURCE[gosttest]=gosttest.c helpers/ssltestlib.c
   INCLUDE[gosttest]=../include ../apps/include ..
   DEPEND[gosttest]=../libcrypto ../libssl libtestutil.a
 
@@ -789,7 +789,7 @@ IF[{- !$disabled{tests} -}]
   DEPEND[hexstr_test]=../libcrypto.a libtestutil.a
 
   PROGRAMS{noinst}=endecode_test
-  SOURCE[endecode_test]=endecode_test.c predefined_dhparams.c
+  SOURCE[endecode_test]=endecode_test.c helpers/predefined_dhparams.c
   INCLUDE[endecode_test]=.. ../include ../apps/include
   DEPEND[endecode_test]=../libcrypto.a libtestutil.a
 
index 10661b3ff0a2c90bc291236952dca17fb2a07c37..33cc03cb4c1571d6fbd9d59c5d7b9af7d1007685 100644 (file)
@@ -9,7 +9,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include "cmp_testlib.h"
+#include "helpers/cmp_testlib.h"
 
 static unsigned char rand_data[OSSL_CMP_TRANSACTIONID_LENGTH];
 
index dfb7dcb9f089f09871f95300256d5584a48e25d4..17f932a73a41439b7a9ff9999411e4e4b67f4041 100644 (file)
@@ -9,7 +9,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include "cmp_testlib.h"
+#include "helpers/cmp_testlib.h"
 
 #include "apps/cmp_mock_srv.h"
 
index 76c8c4613b5b78d14d680771dcbf89c2153b7e6f..3ea3013abeeb583d7d52ecc8408d48b495748163 100644 (file)
@@ -9,7 +9,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include "cmp_testlib.h"
+#include "helpers/cmp_testlib.h"
 
 #include <openssl/x509_vfy.h>
 
index 75baefb7b98082829a3c049255a25bb4ab918588..17f38377b5a33210bcca346478ae4b68a5815b7f 100644 (file)
@@ -9,7 +9,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include "cmp_testlib.h"
+#include "helpers/cmp_testlib.h"
 
 static unsigned char rand_data[OSSL_CMP_TRANSACTIONID_LENGTH];
 
index 59b0a1777d671ea1888f35a6c3e7bb168e42c596..41ba5cf975b0a2100bc962ef48715965fbfabd08 100644 (file)
@@ -9,7 +9,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include "cmp_testlib.h"
+#include "helpers/cmp_testlib.h"
 
 static const char *newkey_f;
 static const char *server_cert_f;
index 933adcb196464074c0ec8a67d98d35a3efa882c2..3cca30144d53e7dd99fc6aa908a4e5cfab0b3bcf 100644 (file)
@@ -9,7 +9,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include "cmp_testlib.h"
+#include "helpers/cmp_testlib.h"
 
 static const char *ir_protected_f;
 static const char *ir_unprotected_f;
index 8d0e1de7598fab3cdc948b8ce39fe9f4a5ff691a..49108bfa177f39a3a02559a61b9f808b3373e6f8 100644 (file)
@@ -9,7 +9,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include "cmp_testlib.h"
+#include "helpers/cmp_testlib.h"
 
 typedef struct test_fixture {
     const char *test_case_name;
index 7358f1589f1ea71d337f5202341b1f48afb9a78a..6248cc9b32a8142422101f81ca442d8f8f40dd86 100644 (file)
@@ -9,7 +9,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include "cmp_testlib.h"
+#include "helpers/cmp_testlib.h"
 
 typedef struct test_fixture {
     const char *test_case_name;
index 2343ebe699342689b31369d736793e7adca9cc94..67112f6489e7715967090b2807a16b0bc69c2889 100644 (file)
@@ -9,7 +9,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include "cmp_testlib.h"
+#include "helpers/cmp_testlib.h"
 #include "../crypto/crmf/crmf_local.h" /* for manipulating POPO signature */
 
 static const char *server_f;
index 588ca32c79f51ab67e2bb888bc65077093097715..612b76a3bcb8a2906f619da35447fb4057b74d15 100644 (file)
@@ -14,7 +14,7 @@
 #include <openssl/ssl.h>
 #include <openssl/err.h>
 
-#include "ssltestlib.h"
+#include "helpers/ssltestlib.h"
 #include "testutil.h"
 
 /* for SSL_READ_ETM() */
index 775ba22114318a7c1d77e854757c6b4e57e26903..2d8aaf47096ef1d03e43f9336f76850fd228a1ee 100644 (file)
@@ -13,7 +13,7 @@
 #include <openssl/ssl.h>
 #include <openssl/err.h>
 
-#include "ssltestlib.h"
+#include "helpers/ssltestlib.h"
 #include "testutil.h"
 
 static char *cert = NULL;
index e01cc4ddffb5801e71fc723b9187c5234de99e48..e8cdd611e6f184c2ba7e3de7033f93c5ea28c2a7 100644 (file)
@@ -22,7 +22,7 @@
 #include "internal/cryptlib.h"   /* ossl_assert */
 #include "crypto/pem.h"          /* For PVK and "blob" PEM headers */
 
-#include "predefined_dhparams.h"
+#include "helpers/predefined_dhparams.h"
 #include "testutil.h"
 
 #ifndef OPENSSL_NO_EC
index 936184545021ac4b78affa9d21b9a1ed14687b34..ba26108eb280ac3f5540d9801b909de55a12a29d 100644 (file)
@@ -26,7 +26,9 @@
 #include "internal/nelem.h"
 #include "crypto/evp.h"
 #include "testutil.h"
-#include "evp_test.h"
+
+typedef struct evp_test_buffer_st EVP_TEST_BUFFER;
+DEFINE_STACK_OF(EVP_TEST_BUFFER)
 
 #define AAD_NUM 4
 
diff --git a/test/evp_test.h b/test/evp_test.h
deleted file mode 100644 (file)
index 028ca34..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
- * Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
- *
- * Licensed under the Apache License 2.0 (the "License").  You may not use
- * this file except in compliance with the License.  You can obtain a copy
- * in the file LICENSE in the source distribution or at
- * https://www.openssl.org/source/license.html
- */
-
-typedef struct evp_test_buffer_st EVP_TEST_BUFFER;
-DEFINE_STACK_OF(EVP_TEST_BUFFER)
index a2538c592101e4cba52a4805154e22d563c9df23..30930d9ce8a59c45a862a2aaf101f710eedf8964 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <openssl/ssl.h>
 #include <openssl/err.h>
-#include "ssltestlib.h"
+#include "helpers/ssltestlib.h"
 #include "testutil.h"
 #include <string.h>
 
index b61e4efa496a33722f8a7a8a8d225f86f34794fc..84c5e6c501a74831c17cee4703b0288de2658cdb 100644 (file)
@@ -7,7 +7,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include "ssltestlib.h"
+#include "helpers/ssltestlib.h"
 #include "testutil.h"
 #include "internal/nelem.h"
 
similarity index 95%
rename from test/cmp_testlib.h
rename to test/helpers/cmp_testlib.h
index e4361b198a7da8f6a3fe12301346678cc05e7b7f..0bee099a676230dac7fd5c19118b3bb80a0ad75c 100644 (file)
@@ -17,9 +17,8 @@
 # include <openssl/rand.h>
 # include "crypto/x509.h" /* for x509_set0_libctx() and x509_dup_ex() */
 
-# include "../crypto/cmp/cmp_local.h"
-
-# include "testutil.h"
+# include "../../crypto/cmp/cmp_local.h"
+# include "../testutil.h"
 
 # ifndef OPENSSL_NO_CMP
 #  define CMP_TEST_REFVALUE_LENGTH 15 /* arbitrary value */
similarity index 99%
rename from test/handshake_helper.c
rename to test/helpers/handshake.c
index 5253f0d602de3a673a70f3b275a495b9863e9a51..08fcd39beadc160c5ece7be4b4634f4f1fbe7390 100644 (file)
 #include <openssl/srp.h>
 #endif
 
-#include "../ssl/ssl_local.h"
+#include "../../ssl/ssl_local.h"
 #include "internal/sockets.h"
 #include "internal/nelem.h"
-#include "handshake_helper.h"
-#include "testutil.h"
+#include "handshake.h"
+#include "../testutil.h"
 
 #if !defined(OPENSSL_NO_SCTP) && !defined(OPENSSL_NO_SOCK)
 #include <netinet/sctp.h>
similarity index 99%
rename from test/pkcs12_helper.c
rename to test/helpers/pkcs12.c
index dd64a2a716ab47afd4c7527f5a80110872ec380b..6489609d25de8a36be4b49411efa152eeeaebe3b 100644 (file)
@@ -18,8 +18,8 @@
 #include <openssl/x509v3.h>
 #include <openssl/pem.h>
 
-#include "testutil.h"
-#include "pkcs12_helper.h"
+#include "../testutil.h"
+#include "pkcs12.h" /* from the same directory */
 
 /* Set this to > 0 write test data to file */
 int write_files = 0;
similarity index 99%
rename from test/pkcs12_helper.h
rename to test/helpers/pkcs12.h
index 8ae640d7f8688addfb7204b55df404b6bd4b93d0..01e1cf1595e11711ad44721877f4ae96c5046d18 100644 (file)
@@ -18,7 +18,7 @@
 #include <openssl/x509v3.h>
 #include <openssl/pem.h>
 
-#include "testutil.h"
+#include "../testutil.h"
 
 /* Set this to > 0 write test data to file */
 extern int write_files;
similarity index 99%
rename from test/ssl_test_ctx.c
rename to test/helpers/ssl_test_ctx.c
index 5c3de4c436e318dcd04374b9a31890872730daac..db4752c54ff21eb3681c3ad4473014481843c942 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "internal/nelem.h"
 #include "ssl_test_ctx.h"
-#include "testutil.h"
+#include "../testutil.h"
 
 #ifdef OPENSSL_SYS_WINDOWS
 # define strcasecmp _stricmp
similarity index 99%
rename from test/ssltestlib.c
rename to test/helpers/ssltestlib.c
index 1fbe51763bc614623d83aa5981df3f12da3c0ed4..2366c3db4d7321242e14076012cb5d605bc26b79 100644 (file)
@@ -12,7 +12,7 @@
 #include "internal/nelem.h"
 #include "internal/cryptlib.h" /* for ossl_sleep() */
 #include "ssltestlib.h"
-#include "testutil.h"
+#include "../testutil.h"
 #include "e_os.h"
 
 #ifdef OPENSSL_SYS_UNIX
similarity index 100%
rename from test/ssltestlib.h
rename to test/helpers/ssltestlib.h
index 4b638af82d52747958d8cab62382e68609d42d00..8b1448f19cd38464113b2f99007148cb854efd53 100644 (file)
@@ -19,7 +19,7 @@
 #include <openssl/pem.h>
 
 #include "testutil.h"
-#include "pkcs12_helper.h"
+#include "helpers/pkcs12.h"
 
 
 /* --------------------------------------------------------------------------
index aa2428559fe92bb5469dc8f69542d91b47ec09ab..4e3c0998a29f00c90096b5e4cf2c6a72242b018e 100644 (file)
@@ -75,7 +75,7 @@ my $P2intermediate="tmp_intP2.ss";
 my $server_sess="server.ss";
 my $client_sess="client.ss";
 
-# ssltest_old.c is deprecated in favour of the new framework in ssl_test.c
+# ssl_old_test.c is deprecated in favour of the new framework in ssl_test.c
 # If you're adding tests here, you probably want to convert them to the
 # new format in ssl_test.c and add recipes to 80-test_ssl_new.t instead.
 plan tests =>
@@ -333,7 +333,7 @@ sub testssl {
         push @providerflags, "-provider", "legacy";
     }
 
-    my @ssltest = ("ssltest_old",
+    my @ssltest = ("ssl_old_test",
                    "-s_key", $key, "-s_cert", $cert,
                    "-c_key", $key, "-c_cert", $cert,
                    "-config", $configfile,
@@ -438,7 +438,7 @@ sub testssl {
         }
 
         my @protocols = ();
-        # We only use the flags that ssltest_old understands
+        # We only use the flags that ssl_old_test understands
         push @protocols, "-tls1_3" unless $no_tls1_3;
         push @protocols, "-tls1_2" unless $no_tls1_2;
         push @protocols, "-tls1" unless $no_tls1 || $provider eq "fips";
@@ -482,7 +482,7 @@ sub testssl {
 
         foreach my $protocol (sort keys %ciphersuites) {
             note "Testing ciphersuites for $protocol";
-            # ssltest_old doesn't know -tls1_3, but that's fine, since that's
+            # ssl_old_test doesn't know -tls1_3, but that's fine, since that's
             # the default choice if TLSv1.3 enabled
             my $flag = $protocol eq "-tls1_3" ? "" : $protocol;
             my $ciphersuites = "";
@@ -541,13 +541,13 @@ sub testssl {
            skip "skipping RSA tests", 2
                if $no_rsa;
 
-           ok(run(test(["ssltest_old", "-provider", "default", "-v", "-bio_pair", "-tls1", "-s_cert", srctop_file("apps","server2.pem"), "-no_dhe", "-no_ecdhe", "-num", "10", "-f", "-time"])),
+           ok(run(test(["ssl_old_test", "-provider", "default", "-v", "-bio_pair", "-tls1", "-s_cert", srctop_file("apps","server2.pem"), "-no_dhe", "-no_ecdhe", "-num", "10", "-f", "-time"])),
               'test tlsv1 with 1024bit RSA, no (EC)DHE, multiple handshakes');
 
            skip "skipping RSA+DHE tests", 1
                if $no_dh;
 
-           ok(run(test(["ssltest_old", "-provider", "default", "-v", "-bio_pair", "-tls1", "-s_cert", srctop_file("apps","server2.pem"), "-dhe1024dsa", "-num", "10", "-f", "-time"])),
+           ok(run(test(["ssl_old_test", "-provider", "default", "-v", "-bio_pair", "-tls1", "-s_cert", srctop_file("apps","server2.pem"), "-dhe1024dsa", "-num", "10", "-f", "-time"])),
               'test tlsv1 with 1024bit RSA, 1024bit DHE, multiple handshakes');
          }
 
index cfd1a7cbf545c8f96b2b5807a68d855aaa15d867..5388db7ddd498726b3f5d331534dcaaf78b82c89 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <string.h>
 
-#include "ssltestlib.h"
+#include "helpers/ssltestlib.h"
 #include "testutil.h"
 
 static char *cert = NULL;
index cf9cdd174a16c759e23703f468ed9d0df4ff5d9e..14088211c9d40d8909ae657d128899323b373478 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "testutil.h"
 #include "internal/nelem.h"
-#include "ssltestlib.h"
+#include "helpers/ssltestlib.h"
 
 #define CLIENT_VERSION_LEN      2
 
similarity index 99%
rename from test/ssltest_old.c
rename to test/ssl_old_test.c
index 794d87867599543a09bce230e25c4d2e86656b06..54b1ca4236f84cc76e416bcebe95138ee666e210 100644 (file)
@@ -72,7 +72,7 @@
 # include <unistd.h>
 #endif
 
-#include "predefined_dhparams.h"
+#include "helpers/predefined_dhparams.h"
 
 static SSL_CTX *s_ctx = NULL;
 static SSL_CTX *s_ctx2 = NULL;
index d902283edff8ead0423d862914963658f7eed0ef..09141b2fedd6942ce9275d3f9472afe478a96dcd 100644 (file)
@@ -15,8 +15,8 @@
 #include <openssl/ssl.h>
 #include <openssl/provider.h>
 
-#include "handshake_helper.h"
-#include "ssl_test_ctx.h"
+#include "helpers/handshake.h"
+#include "helpers/ssl_test_ctx.h"
 #include "testutil.h"
 
 static CONF *conf = NULL;
index 91f418095f18557d06b50412e8cacbf374d51ffe..7579b4b12a3c0eff7cc3d7690f98907c819a72ac 100644 (file)
@@ -16,7 +16,7 @@
 #include <string.h>
 
 #include "internal/nelem.h"
-#include "ssl_test_ctx.h"
+#include "helpers/ssl_test_ctx.h"
 #include "testutil.h"
 #include <openssl/e_os2.h>
 #include <openssl/err.h>
index 19421947de6a3a722cf6855ae190bcbade6eeeed..158295c034e431467923897d854bb77e9d76cfdf 100644 (file)
@@ -32,7 +32,7 @@
 #include <openssl/provider.h>
 #include <openssl/param_build.h>
 
-#include "ssltestlib.h"
+#include "helpers/ssltestlib.h"
 #include "testutil.h"
 #include "testutil/output.h"
 #include "internal/nelem.h"
index 3d034d60414acda3625b42f3b4cc1c93bf3594cb..3c3e69d61da80e7d2edfd46b6b7c4f3d1d237aa1 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "internal/packet.h"
 
-#include "ssltestlib.h"
+#include "helpers/ssltestlib.h"
 #include "testutil.h"
 
 struct async_ctrs {
index 97d235c8ad742aef62ab2e351b78e62c42c9ba03..d270d42351e8ad95b2c520d8697dacdb30d633bc 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <string.h>
-#include "ssltestlib.h"
+#include "helpers/ssltestlib.h"
 #include "testutil.h"
 
 static int docorrupt = 0;
index 3a81ceba22ecd42c4e59ea2f6e04a9329505d1cb..3a3fa8c22a267eee9dbe8f0c3924d5f15ccced15 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <openssl/ssl.h>
 #include <string.h>
-#include "ssltestlib.h"
+#include "helpers/ssltestlib.h"
 #include "testutil.h"
 #include "internal/packet.h"