[openssl] master update

dev at ddvo.net dev at ddvo.net
Tue Dec 1 06:50:07 UTC 2020


The branch master has been updated
       via  1234aa7e415e1e239eb1c4504578ab59d90763ea (commit)
       via  20f8bc72552932393023f5bc5b436cc40cdd1348 (commit)
       via  93a9ffa6c2d8440328deca5e860ae9cf38d81d8a (commit)
       via  2de4c878898f861e7c719ce5be23d25010c8b07f (commit)
      from  172daa7fc7d8cdf37a5203cfeb3e3030d15c1a12 (commit)


- Log -----------------------------------------------------------------
commit 1234aa7e415e1e239eb1c4504578ab59d90763ea
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date:   Sun Nov 29 12:46:12 2020 +0100

    endecode_test.c: Add warning that 512-bit DH key size is for testing only
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/13568)

commit 20f8bc72552932393023f5bc5b436cc40cdd1348
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date:   Sun Nov 29 12:40:10 2020 +0100

    test cleanup: move helper .c and .h files to test/helpers/
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/13568)

commit 93a9ffa6c2d8440328deca5e860ae9cf38d81d8a
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date:   Sun Nov 29 12:38:02 2020 +0100

    remove obsolete test/drbg_cavs_data.h
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/13568)

commit 2de4c878898f861e7c719ce5be23d25010c8b07f
Author: Dr. David von Oheimb <David.von.Oheimb at siemens.com>
Date:   Sun Nov 29 12:37:23 2020 +0100

    remove obsolete test/drbg_extra_test.h
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/13568)

-----------------------------------------------------------------------

Summary of changes:
 test/asynciotest.c                               |   2 +-
 test/build.info                                  |  68 ++++----
 test/cmp_asn_test.c                              |   2 +-
 test/cmp_client_test.c                           |   2 +-
 test/cmp_ctx_test.c                              |   2 +-
 test/cmp_hdr_test.c                              |   2 +-
 test/cmp_msg_test.c                              |   2 +-
 test/cmp_protect_test.c                          |   2 +-
 test/cmp_server_test.c                           |   2 +-
 test/cmp_status_test.c                           |   2 +-
 test/cmp_vfy_test.c                              |   2 +-
 test/drbg_cavs_data.h                            |  88 -----------
 test/drbg_extra_test.h                           | 188 -----------------------
 test/dtls_mtu_test.c                             |   2 +-
 test/dtlstest.c                                  |   2 +-
 test/endecode_test.c                             |   7 +-
 test/evp_test.c                                  |   4 +-
 test/evp_test.h                                  |  11 --
 test/fatalerrtest.c                              |   2 +-
 test/gosttest.c                                  |   2 +-
 test/{ => helpers}/cmp_testlib.c                 |   0
 test/{ => helpers}/cmp_testlib.h                 |   5 +-
 test/{handshake_helper.c => helpers/handshake.c} |   6 +-
 test/{handshake_helper.h => helpers/handshake.h} |   0
 test/{pkcs12_helper.c => helpers/pkcs12.c}       |   4 +-
 test/{pkcs12_helper.h => helpers/pkcs12.h}       |   2 +-
 test/{ => helpers}/predefined_dhparams.c         |   0
 test/{ => helpers}/predefined_dhparams.h         |   0
 test/{ => helpers}/ssl_test_ctx.c                |   2 +-
 test/{ => helpers}/ssl_test_ctx.h                |   0
 test/{ => helpers}/ssltestlib.c                  |   2 +-
 test/{ => helpers}/ssltestlib.h                  |   0
 test/pkcs12_format_test.c                        |   2 +-
 test/recipes/80-test_ssl_old.t                   |  12 +-
 test/recordlentest.c                             |   2 +-
 test/servername_test.c                           |   2 +-
 test/{ssltest_old.c => ssl_old_test.c}           |   2 +-
 test/ssl_test.c                                  |   4 +-
 test/ssl_test_ctx_test.c                         |   2 +-
 test/sslapitest.c                                |   2 +-
 test/sslbuffertest.c                             |   2 +-
 test/sslcorrupttest.c                            |   2 +-
 test/testutil/{output_helpers.c => output.c}     |   0
 test/tls13ccstest.c                              |   2 +-
 44 files changed, 83 insertions(+), 366 deletions(-)
 delete mode 100644 test/drbg_cavs_data.h
 delete mode 100644 test/drbg_extra_test.h
 delete mode 100644 test/evp_test.h
 rename test/{ => helpers}/cmp_testlib.c (100%)
 rename test/{ => helpers}/cmp_testlib.h (95%)
 rename test/{handshake_helper.c => helpers/handshake.c} (99%)
 rename test/{handshake_helper.h => helpers/handshake.h} (100%)
 rename test/{pkcs12_helper.c => helpers/pkcs12.c} (99%)
 rename test/{pkcs12_helper.h => helpers/pkcs12.h} (99%)
 rename test/{ => helpers}/predefined_dhparams.c (100%)
 rename test/{ => helpers}/predefined_dhparams.h (100%)
 rename test/{ => helpers}/ssl_test_ctx.c (99%)
 rename test/{ => helpers}/ssl_test_ctx.h (100%)
 rename test/{ => helpers}/ssltestlib.c (99%)
 rename test/{ => helpers}/ssltestlib.h (100%)
 rename test/{ssltest_old.c => ssl_old_test.c} (99%)
 rename test/testutil/{output_helpers.c => output.c} (100%)

diff --git a/test/asynciotest.c b/test/asynciotest.c
index 4147ee128c..10c958f667 100644
--- a/test/asynciotest.c
+++ b/test/asynciotest.c
@@ -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*/
diff --git a/test/build.info b/test/build.info
index d781b10393..463e3cd262 100644
--- a/test/build.info
+++ b/test/build.info
@@ -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
 
diff --git a/test/cmp_asn_test.c b/test/cmp_asn_test.c
index 10661b3ff0..33cc03cb4c 100644
--- a/test/cmp_asn_test.c
+++ b/test/cmp_asn_test.c
@@ -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];
 
diff --git a/test/cmp_client_test.c b/test/cmp_client_test.c
index dfb7dcb9f0..17f932a73a 100644
--- a/test/cmp_client_test.c
+++ b/test/cmp_client_test.c
@@ -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"
 
diff --git a/test/cmp_ctx_test.c b/test/cmp_ctx_test.c
index 76c8c4613b..3ea3013abe 100644
--- a/test/cmp_ctx_test.c
+++ b/test/cmp_ctx_test.c
@@ -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>
 
diff --git a/test/cmp_hdr_test.c b/test/cmp_hdr_test.c
index 75baefb7b9..17f38377b5 100644
--- a/test/cmp_hdr_test.c
+++ b/test/cmp_hdr_test.c
@@ -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];
 
diff --git a/test/cmp_msg_test.c b/test/cmp_msg_test.c
index 59b0a1777d..41ba5cf975 100644
--- a/test/cmp_msg_test.c
+++ b/test/cmp_msg_test.c
@@ -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;
diff --git a/test/cmp_protect_test.c b/test/cmp_protect_test.c
index 933adcb196..3cca30144d 100644
--- a/test/cmp_protect_test.c
+++ b/test/cmp_protect_test.c
@@ -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;
diff --git a/test/cmp_server_test.c b/test/cmp_server_test.c
index 8d0e1de759..49108bfa17 100644
--- a/test/cmp_server_test.c
+++ b/test/cmp_server_test.c
@@ -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;
diff --git a/test/cmp_status_test.c b/test/cmp_status_test.c
index 7358f1589f..6248cc9b32 100644
--- a/test/cmp_status_test.c
+++ b/test/cmp_status_test.c
@@ -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;
diff --git a/test/cmp_vfy_test.c b/test/cmp_vfy_test.c
index 2343ebe699..67112f6489 100644
--- a/test/cmp_vfy_test.c
+++ b/test/cmp_vfy_test.c
@@ -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;
diff --git a/test/drbg_cavs_data.h b/test/drbg_cavs_data.h
deleted file mode 100644
index f37af3a2a8..0000000000
--- a/test/drbg_cavs_data.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright 2017-2018 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
- */
-
-/*
- * Known answer tests (KAT) for NIST SP800-90A DRBGs.
- */
-
-#include <stddef.h>
-
-#ifndef OSSL_TEST_DRBG_CAVS_DATA_H
-# define OSSL_TEST_DRBG_CAVS_DATA_H
-
-enum drbg_kat_type {
-    NO_RESEED,
-    PR_FALSE,
-    PR_TRUE
-};
-
-enum drbg_flags {
-    NA       = 0,
-    USE_DF   = 1<<0,
-    NO_DF    = 1<<1,
-    USE_HMAC = 1<<2
-};
-
-struct drbg_kat_no_reseed {
-    size_t count;
-    const unsigned char *entropyin;
-    const unsigned char *nonce;
-    const unsigned char *persstr;
-    const unsigned char *addin1;
-    const unsigned char *addin2;
-    const unsigned char *retbytes;
-};
-
-struct drbg_kat_pr_false {
-    size_t count;
-    const unsigned char *entropyin;
-    const unsigned char *nonce;
-    const unsigned char *persstr;
-    const unsigned char *entropyinreseed;
-    const unsigned char *addinreseed;
-    const unsigned char *addin1;
-    const unsigned char *addin2;
-    const unsigned char *retbytes;
-};
-
-struct drbg_kat_pr_true {
-    size_t count;
-    const unsigned char *entropyin;
-    const unsigned char *nonce;
-    const unsigned char *persstr;
-    const unsigned char *entropyinpr1;
-    const unsigned char *addin1;
-    const unsigned char *entropyinpr2;
-    const unsigned char *addin2;
-    const unsigned char *retbytes;
-};
-
-struct drbg_kat {
-    enum drbg_kat_type type;
-    enum drbg_flags flags;
-    int nid;
-
-    size_t entropyinlen;
-    size_t noncelen;
-    size_t persstrlen;
-    size_t addinlen;
-    size_t retbyteslen;
-
-    const void *t;
-};
-
-extern const struct drbg_kat *drbg_ctr_test[];
-extern const struct drbg_kat *drbg_hmac_test[];
-extern const struct drbg_kat *drbg_hash_test[];
-
-extern const size_t drbg_ctr_nelem;
-extern const size_t drbg_hmac_nelem;
-extern const size_t drbg_hash_nelem;
-
-#endif
diff --git a/test/drbg_extra_test.h b/test/drbg_extra_test.h
deleted file mode 100644
index 5153dafe23..0000000000
--- a/test/drbg_extra_test.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright 2020 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
- */
-
-/*
- * Self generated known answer test (KATs) for NIST SP800-90A AES CTR_DRBG.
- * Test overflow of V after |ngen| generate operation.
- */
-
-#include <stddef.h>
-
-#ifndef DRBG_EXTRA_TEST_H
-# define DRBG_EXTRA_TEST_H
-
-# define BUFFSIZE        512
-# define RESEEDINTERVAL  ((1 << 24) - 1)
-
-struct drbg_extra_kat {
-    int nid;
-    const unsigned char *expected;
-    unsigned long long ngen;
-};
-
-static const unsigned char expected128[BUFFSIZE] = {
-    0x39, 0x10, 0x06, 0x64, 0x68, 0x7d, 0x77, 0x64, 0xf9, 0xb8, 0xe8, 0x3c,
-    0x55, 0xb0, 0xf1, 0x8c, 0xeb, 0x11, 0x23, 0x50, 0x15, 0x28, 0x44, 0x38,
-    0x84, 0x47, 0x7b, 0xc2, 0x78, 0x16, 0x73, 0x57, 0x9f, 0x01, 0x57, 0xf0,
-    0x17, 0x14, 0xa3, 0xa8, 0xdf, 0x3b, 0x87, 0x78, 0x37, 0xf8, 0x53, 0x23,
-    0x18, 0xd2, 0xbc, 0x82, 0xc5, 0xed, 0x51, 0x84, 0x30, 0x14, 0xaa, 0x01,
-    0xb8, 0xb5, 0xed, 0x33, 0x14, 0xe7, 0x6c, 0xa7, 0x38, 0x02, 0x60, 0x69,
-    0x52, 0x0f, 0x5b, 0x7f, 0x4c, 0x82, 0x25, 0x05, 0x10, 0xaa, 0xd5, 0xc6,
-    0xac, 0x44, 0x7c, 0xef, 0x0f, 0x69, 0xc7, 0x4d, 0x07, 0x54, 0x83, 0xb5,
-    0xf2, 0x05, 0x0f, 0x69, 0xfd, 0x85, 0x8f, 0x63, 0x27, 0xe6, 0xff, 0xa5,
-    0x26, 0xd9, 0xf0, 0x8b, 0x31, 0x89, 0xbc, 0x51, 0xb8, 0x62, 0x06, 0x88,
-    0xe7, 0x95, 0xa7, 0x69, 0x7d, 0x43, 0x9c, 0x2b, 0x3c, 0x59, 0x9f, 0xa9,
-    0x63, 0xa3, 0x80, 0x1b, 0xe9, 0x96, 0x6b, 0xde, 0xf2, 0xdb, 0x0c, 0x07,
-    0x22, 0xb1, 0x30, 0xd0, 0x08, 0x66, 0x23, 0x31, 0x63, 0xd2, 0x86, 0xbf,
-    0x6e, 0xcb, 0x44, 0xb7, 0x6a, 0x44, 0xac, 0xe6, 0x53, 0x0b, 0x32, 0x20,
-    0xb6, 0xcb, 0x10, 0x22, 0x57, 0xa5, 0x7f, 0x7d, 0x9e, 0x83, 0xb9, 0xdb,
-    0x27, 0x1b, 0x04, 0xf5, 0x67, 0x94, 0x6e, 0x44, 0xba, 0x77, 0xc2, 0xf6,
-    0x6a, 0xcd, 0xfa, 0x71, 0x44, 0x07, 0x5e, 0x09, 0x6f, 0x42, 0x5c, 0x06,
-    0x55, 0x4f, 0xae, 0xc7, 0x53, 0x73, 0x89, 0x80, 0x2d, 0x5a, 0x73, 0x3c,
-    0x11, 0x8f, 0x76, 0xa1, 0x3b, 0xb6, 0xbe, 0x6b, 0xd2, 0x1f, 0xa7, 0x63,
-    0x7c, 0x99, 0x46, 0x3d, 0x6b, 0x0d, 0x2a, 0xfe, 0x10, 0x00, 0x77, 0x43,
-    0x5b, 0xd0, 0x52, 0x79, 0x8d, 0x1d, 0xfd, 0xe2, 0x9a, 0xac, 0x5c, 0x77,
-    0x69, 0x68, 0xec, 0xf1, 0x92, 0xa8, 0xb7, 0x26, 0xcd, 0x64, 0xef, 0x8f,
-    0x55, 0xa0, 0x83, 0x3f, 0x27, 0xf0, 0x34, 0xc3, 0x61, 0x74, 0xf9, 0x44,
-    0x2d, 0xe1, 0xb3, 0xad, 0x02, 0xc2, 0x45, 0x40, 0x40, 0xc0, 0x0f, 0x05,
-    0x72, 0xdb, 0x71, 0xae, 0x84, 0x4c, 0x3d, 0xd0, 0x61, 0x5d, 0x79, 0x52,
-    0x16, 0xb1, 0x02, 0x07, 0xaf, 0xfa, 0x9a, 0xe0, 0x21, 0xbf, 0x1c, 0xc4,
-    0x21, 0xf9, 0x76, 0x95, 0xc4, 0x92, 0x57, 0xb7, 0x1e, 0xce, 0xb8, 0xd5,
-    0x1c, 0x68, 0x7c, 0xed, 0x8f, 0x45, 0x09, 0x0b, 0xef, 0x30, 0x68, 0xab,
-    0x5f, 0x26, 0x4a, 0xf2, 0x8a, 0x55, 0x97, 0x3d, 0x1c, 0xa0, 0x33, 0x20,
-    0x10, 0x9e, 0x10, 0x77, 0x93, 0xa2, 0xcb, 0x72, 0x33, 0xf3, 0x6f, 0xdc,
-    0x41, 0x46, 0x83, 0xb1, 0x59, 0x22, 0xf0, 0x9b, 0x9f, 0x50, 0x9f, 0x14,
-    0x2e, 0xe0, 0xb8, 0xa3, 0xf7, 0x40, 0x9d, 0xe0, 0x76, 0x78, 0xa6, 0xd4,
-    0xf6, 0xd4, 0x29, 0x33, 0x97, 0x76, 0x54, 0xdf, 0x3e, 0xf0, 0x82, 0x9f,
-    0x4f, 0xf1, 0x0b, 0x0a, 0x61, 0xa2, 0x3f, 0xde, 0xda, 0xfe, 0x93, 0xe1,
-    0x51, 0x19, 0x93, 0x8c, 0xc0, 0x07, 0x76, 0xdb, 0x4a, 0x9c, 0xef, 0x42,
-    0x5f, 0x7b, 0x5b, 0x2c, 0xff, 0xe7, 0x5f, 0x6d, 0xcb, 0x7e, 0x9b, 0xc9,
-    0xf3, 0x94, 0xe9, 0x73, 0xd6, 0xa3, 0x00, 0x7d, 0x11, 0xf8, 0xd6, 0x58,
-    0x97, 0x3e, 0xdf, 0xb9, 0xd5, 0x57, 0xde, 0x51, 0x9e, 0x39, 0x5d, 0x59,
-    0xe5, 0x50, 0x29, 0x3e, 0x58, 0x90, 0x37, 0xa6, 0xcc, 0x06, 0x89, 0xb1,
-    0xa6, 0xa7, 0xef, 0x96, 0x30, 0xf5, 0xc1, 0xea, 0x03, 0xde, 0x46, 0x9a,
-    0x5f, 0xa2, 0x5d, 0xb6, 0x74, 0xfd, 0xbf, 0xde, 0x77, 0x8e, 0x3e, 0x90,
-    0x55, 0x3b, 0x4d, 0x59, 0xde, 0x19, 0x43, 0xcd, 0x5d, 0x1b, 0xba, 0x29,
-    0xa9, 0x59, 0xad, 0xef, 0x2d, 0x9c, 0x3b, 0xc0
-};
-static const struct drbg_extra_kat drbg_extra_test128 = {
-    NID_aes_128_ctr,
-    expected128,
-    61335566ULL
-};
-
-static const unsigned char expected192[BUFFSIZE] = {
-    0x19, 0x1b, 0xe3, 0xa9, 0x58, 0xb4, 0xcc, 0x3a, 0x3a, 0x06, 0x30, 0x6a,
-    0xdc, 0x8c, 0x78, 0xb2, 0x1e, 0xb5, 0x83, 0xa0, 0x04, 0x72, 0xae, 0xed,
-    0xae, 0x88, 0x7c, 0x63, 0x8b, 0xe6, 0x20, 0x9b, 0xb4, 0x04, 0x14, 0xa9,
-    0x83, 0xce, 0xb4, 0xd1, 0x69, 0xc2, 0x00, 0xa5, 0xf4, 0x45, 0xdb, 0xa1,
-    0xcb, 0xd7, 0xfe, 0xf7, 0x19, 0x5d, 0x4d, 0x26, 0x7d, 0x7a, 0x2f, 0xde,
-    0xc1, 0xb3, 0x8e, 0x3e, 0x19, 0xd1, 0xff, 0x25, 0x9b, 0x81, 0x90, 0x11,
-    0x71, 0xb6, 0x08, 0x46, 0x76, 0x58, 0xca, 0x78, 0xae, 0xc3, 0x90, 0x29,
-    0x07, 0x07, 0x85, 0x9d, 0x90, 0xd9, 0xf5, 0x5a, 0x8d, 0x28, 0x87, 0xd3,
-    0x88, 0xd1, 0x14, 0xc1, 0xa8, 0x96, 0xa3, 0x7e, 0x6b, 0xe4, 0x1d, 0xf6,
-    0x0d, 0xfb, 0x3d, 0xee, 0xa9, 0x8c, 0x70, 0xc9, 0x3f, 0x87, 0xad, 0x57,
-    0xd9, 0xe3, 0x4e, 0xfc, 0x03, 0xeb, 0x79, 0xb8, 0xb9, 0xe9, 0xe4, 0x55,
-    0x78, 0x4b, 0xdb, 0xfa, 0xb6, 0x5e, 0x1e, 0x5b, 0xab, 0x11, 0x35, 0x3c,
-    0x97, 0x10, 0x0d, 0x7e, 0x68, 0x47, 0x1a, 0xd0, 0x59, 0xac, 0x41, 0x61,
-    0x8e, 0xfc, 0xd1, 0x12, 0xf6, 0x81, 0x44, 0x5c, 0x78, 0xe4, 0x32, 0x2f,
-    0xa5, 0x4c, 0x6e, 0xf8, 0xbf, 0x35, 0xc2, 0x66, 0xc0, 0x04, 0x77, 0x2e,
-    0x1d, 0xe9, 0xc9, 0x8f, 0xca, 0xd7, 0x2a, 0xf0, 0x35, 0x34, 0x3a, 0xf6,
-    0x7e, 0x0d, 0xc6, 0xc2, 0x4a, 0xd0, 0x91, 0x5d, 0xf5, 0x47, 0xdb, 0x32,
-    0x88, 0x52, 0x98, 0xf0, 0xca, 0xc9, 0x57, 0x34, 0x10, 0xca, 0xfa, 0x9d,
-    0x23, 0x61, 0x41, 0x55, 0xc8, 0x65, 0xa4, 0x4e, 0xa5, 0x8b, 0x1a, 0xdc,
-    0x14, 0x80, 0x26, 0xe7, 0x72, 0x98, 0x90, 0x14, 0x01, 0x52, 0xa4, 0x9f,
-    0x55, 0xe4, 0xaa, 0x15, 0x20, 0xd4, 0x34, 0x3f, 0x36, 0xce, 0x93, 0x5d,
-    0x7b, 0x49, 0x29, 0x3f, 0xef, 0x78, 0xe9, 0x2e, 0x4c, 0x87, 0xa1, 0xb6,
-    0x28, 0xb7, 0xa3, 0xb4, 0x49, 0x84, 0xf5, 0x5d, 0x24, 0x7d, 0x57, 0x57,
-    0x79, 0xf5, 0xa1, 0x67, 0x5b, 0x8c, 0x59, 0x43, 0x3a, 0x1f, 0x10, 0x51,
-    0x57, 0xa0, 0xe5, 0x18, 0xba, 0xdd, 0xca, 0x2d, 0xa9, 0xc5, 0xef, 0xad,
-    0x7e, 0xd5, 0x17, 0xa3, 0x66, 0xe0, 0x93, 0x00, 0xda, 0xfc, 0x90, 0x89,
-    0x64, 0x01, 0x10, 0x6a, 0xe7, 0x51, 0x7e, 0x5c, 0x16, 0x87, 0x4a, 0xc2,
-    0x04, 0x27, 0x5c, 0x71, 0xdb, 0xcb, 0xb4, 0x70, 0xfc, 0x5e, 0xfb, 0xce,
-    0xba, 0xc8, 0x20, 0x80, 0x5d, 0x73, 0xdb, 0xb4, 0x30, 0x8b, 0xfc, 0xcf,
-    0xd1, 0x09, 0xa1, 0x93, 0xa3, 0x3e, 0x86, 0x76, 0x86, 0x5a, 0xa4, 0xba,
-    0xda, 0xb8, 0x03, 0x1d, 0x69, 0x99, 0x29, 0xef, 0xe1, 0x7b, 0x6a, 0xd3,
-    0x95, 0x9e, 0x98, 0x5a, 0x39, 0xb0, 0xde, 0x53, 0x49, 0x09, 0x7d, 0xdd,
-    0x89, 0xed, 0x90, 0xc6, 0xa3, 0x8c, 0xe6, 0x15, 0x2f, 0x5a, 0x47, 0x8a,
-    0x66, 0xf7, 0x1f, 0x38, 0x9e, 0xae, 0x9b, 0x46, 0x71, 0x96, 0x21, 0xbf,
-    0x9f, 0x8e, 0x60, 0x2c, 0xda, 0xd6, 0x38, 0xf0, 0xc5, 0xe6, 0x27, 0x4b,
-    0xfa, 0xc2, 0x13, 0x1a, 0x6b, 0xf5, 0x47, 0x97, 0x2f, 0xd0, 0x34, 0xe7,
-    0x71, 0x9f, 0x8b, 0xc7, 0x22, 0xec, 0x97, 0x38, 0xe2, 0x07, 0x2b, 0x02,
-    0x76, 0xf7, 0xb5, 0xdc, 0x55, 0xaf, 0x8e, 0xe6, 0x92, 0x57, 0x82, 0x82,
-    0xf2, 0x1e, 0x10, 0x37, 0x40, 0xc4, 0x91, 0x25, 0xa7, 0x5c, 0xed, 0x1b,
-    0x61, 0xc7, 0xc4, 0x47, 0xac, 0xe5, 0xb8, 0x7b, 0xdc, 0xfc, 0xaa, 0xd4,
-    0x0c, 0xcc, 0x93, 0xee, 0x69, 0xd7, 0x35, 0xcf, 0xd7, 0x47, 0x05, 0xfc,
-    0x88, 0xeb, 0x29, 0x0b, 0x62, 0x8e, 0x51, 0xb0, 0xd6, 0x71, 0xa0, 0xf2,
-    0x17, 0x74, 0x1a, 0x2d, 0x4f, 0xb0, 0xd9, 0x8b
-};
-static const struct drbg_extra_kat drbg_extra_test192 = {
-    NID_aes_192_ctr,
-    expected192,
-    10132467ULL
-};
-
-static const unsigned char expected256[BUFFSIZE] = {
-    0x3f, 0x6d, 0x24, 0x4d, 0xe8, 0xdf, 0x93, 0xe5, 0xde, 0x4f, 0xba, 0x25,
-    0x9c, 0x97, 0xfa, 0xbb, 0x78, 0x6f, 0xe7, 0xce, 0x74, 0x66, 0xa3, 0x81,
-    0xf1, 0x0e, 0xf9, 0xea, 0xb6, 0xfc, 0xc2, 0xc5, 0xf0, 0x25, 0x0d, 0x45,
-    0x45, 0x8a, 0x3e, 0xf2, 0x93, 0xf3, 0x2c, 0x41, 0x46, 0x2d, 0x58, 0x56,
-    0x7e, 0x6a, 0x5c, 0x8a, 0x51, 0x3f, 0xd1, 0x76, 0x09, 0x6d, 0xf4, 0xf0,
-    0x01, 0x8f, 0x60, 0x68, 0x9c, 0x52, 0xb2, 0xb1, 0xd2, 0x3e, 0x07, 0x10,
-    0xab, 0x6c, 0xc9, 0x78, 0x22, 0xf4, 0xde, 0xbc, 0xee, 0x23, 0xa9, 0xb5,
-    0x81, 0x2c, 0x4c, 0xf7, 0xd6, 0x35, 0x53, 0x1f, 0x66, 0x42, 0x1d, 0x7a,
-    0x6d, 0x6e, 0x56, 0x8d, 0xbc, 0x03, 0xac, 0x76, 0x6c, 0x46, 0x4a, 0x80,
-    0x87, 0x97, 0x62, 0xc6, 0xe8, 0x21, 0x35, 0xbd, 0x1d, 0x17, 0x28, 0x80,
-    0x79, 0x6a, 0xe0, 0xc5, 0x33, 0x51, 0x38, 0xa6, 0xdf, 0x8d, 0xf6, 0xb3,
-    0x69, 0x4f, 0x3b, 0xb2, 0xb1, 0x8e, 0x28, 0x8a, 0x3b, 0xba, 0x80, 0x43,
-    0x7a, 0x92, 0x5e, 0x11, 0xd7, 0x4a, 0x8d, 0xa5, 0xee, 0x7c, 0x30, 0x69,
-    0x7c, 0x27, 0x0f, 0xb8, 0x10, 0xd4, 0x32, 0x5f, 0xad, 0x27, 0xf4, 0xf1,
-    0x31, 0xfe, 0x41, 0x08, 0x8c, 0x09, 0xe5, 0x9c, 0x55, 0x97, 0xa5, 0x38,
-    0x7f, 0x72, 0x5b, 0x0a, 0xb3, 0x44, 0x2d, 0x4f, 0x65, 0xba, 0x74, 0x0c,
-    0x35, 0x2f, 0x57, 0xfb, 0x21, 0x9c, 0x80, 0x2a, 0xd8, 0x0d, 0x56, 0xa7,
-    0x99, 0x8b, 0xd9, 0xaf, 0x6f, 0x45, 0x06, 0x94, 0xf5, 0x6f, 0x56, 0x32,
-    0x3d, 0x6c, 0xd6, 0x91, 0x30, 0x88, 0xdd, 0x61, 0x79, 0xa8, 0xac, 0x03,
-    0xcf, 0x1c, 0x53, 0xd4, 0xdf, 0x6f, 0x39, 0x9c, 0x9f, 0xa9, 0xb5, 0x8c,
-    0x8b, 0xc3, 0x20, 0x89, 0x5e, 0xf9, 0x74, 0x0c, 0xda, 0x7b, 0x2a, 0x22,
-    0xa4, 0xcc, 0x00, 0x78, 0x66, 0x5e, 0xe5, 0x49, 0x5b, 0x3e, 0xfe, 0x85,
-    0xcd, 0x9a, 0xa7, 0xcd, 0xb0, 0xf1, 0x2b, 0xe7, 0x3b, 0x23, 0x09, 0xb2,
-    0x26, 0x66, 0x6c, 0x64, 0xd9, 0x35, 0x69, 0xd4, 0xfe, 0xc1, 0x3f, 0xbd,
-    0xf3, 0x15, 0x15, 0x83, 0x1f, 0x92, 0x5f, 0x25, 0x0b, 0x1f, 0x54, 0xeb,
-    0xfc, 0x40, 0x96, 0xb4, 0x71, 0x2a, 0x3b, 0xa3, 0x94, 0xfa, 0x41, 0xfa,
-    0x43, 0x4e, 0xf1, 0x85, 0xc4, 0x2d, 0x40, 0xf0, 0x1a, 0x0d, 0x88, 0xf2,
-    0xd4, 0x1f, 0x9d, 0x80, 0x69, 0x56, 0xb1, 0xa4, 0xcb, 0xa1, 0x35, 0x98,
-    0xda, 0xa4, 0xa3, 0x6d, 0xd8, 0x01, 0x98, 0xe0, 0x2e, 0x13, 0xc2, 0x7d,
-    0x74, 0x6a, 0x62, 0x7a, 0xef, 0x93, 0x65, 0x94, 0x37, 0xa6, 0x5b, 0xcb,
-    0x23, 0xe6, 0x23, 0x3d, 0xa5, 0x7e, 0x30, 0x59, 0x36, 0x85, 0xee, 0xfb,
-    0xe8, 0x33, 0x3c, 0xf5, 0xc3, 0x4e, 0xf2, 0xc4, 0x70, 0xc8, 0x4f, 0x00,
-    0x39, 0x7d, 0x20, 0x7f, 0x72, 0x57, 0xd9, 0xb9, 0xf6, 0xfe, 0xf2, 0x50,
-    0x44, 0xed, 0x53, 0xdc, 0xd6, 0xd5, 0x1f, 0x94, 0xea, 0x62, 0x9e, 0x64,
-    0x23, 0xd6, 0x6d, 0x8a, 0x6e, 0xfb, 0xc2, 0xb3, 0x7e, 0x72, 0x26, 0xad,
-    0x31, 0x30, 0x81, 0xb7, 0x62, 0x10, 0xaf, 0x8e, 0x45, 0x74, 0x6e, 0x8f,
-    0x07, 0x5a, 0xfe, 0xe3, 0xa7, 0xe8, 0x47, 0x80, 0x7e, 0x1d, 0xb5, 0x8c,
-    0xab, 0xcb, 0x0b, 0x95, 0xb2, 0x95, 0x64, 0x5e, 0xea, 0x42, 0x14, 0x6f,
-    0x6b, 0xe4, 0x81, 0x51, 0x78, 0xb4, 0x0e, 0x0c, 0x6e, 0x22, 0x31, 0xb2,
-    0x50, 0xd9, 0x78, 0xc6, 0xfa, 0xa4, 0xb6, 0xf4, 0x17, 0x20, 0xbe, 0xe3,
-    0x69, 0xfa, 0x6c, 0xb9, 0x98, 0xad, 0xca, 0xba, 0x72, 0xa2, 0x22, 0x4c,
-    0x0a, 0xb3, 0x6d, 0x9b, 0x11, 0x8a, 0x59, 0x06, 0xf1, 0xda, 0x43, 0xc2,
-    0xae, 0xb0, 0x80, 0x35, 0x86, 0xbf, 0xf0, 0x8c
-};
-static const struct drbg_extra_kat drbg_extra_test256 = {
-    NID_aes_256_ctr,
-    expected256,
-    40870394ULL
-};
-
-static const struct drbg_extra_kat *drbg_extra_test[] = {
-    &drbg_extra_test128,
-    &drbg_extra_test192,
-    &drbg_extra_test256,
-};
-
-#endif
diff --git a/test/dtls_mtu_test.c b/test/dtls_mtu_test.c
index 588ca32c79..612b76a3bc 100644
--- a/test/dtls_mtu_test.c
+++ b/test/dtls_mtu_test.c
@@ -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() */
diff --git a/test/dtlstest.c b/test/dtlstest.c
index 775ba22114..2d8aaf4709 100644
--- a/test/dtlstest.c
+++ b/test/dtlstest.c
@@ -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;
diff --git a/test/endecode_test.c b/test/endecode_test.c
index e01cc4ddff..d7edd350a1 100644
--- a/test/endecode_test.c
+++ b/test/endecode_test.c
@@ -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
@@ -46,7 +46,10 @@ static EVP_PKEY *make_template(const char *type, OSSL_PARAM *genparams)
     EVP_PKEY_CTX *ctx = NULL;
 
 #ifndef OPENSSL_NO_DH
-    /* use DH(X) keys with predetermined parameters for efficiency */
+    /*
+     * Use 512-bit DH(X) keys with predetermined parameters for efficiency,
+     * for testing only. Use a minimum key size of 2048 for security purposes.
+     */
     if (strcmp(type, "DH") == 0)
         return get_dh512(NULL);
     if (strcmp(type, "X9.42 DH") == 0)
diff --git a/test/evp_test.c b/test/evp_test.c
index 9361845450..ba26108eb2 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -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
index 028ca341ff..0000000000
--- a/test/evp_test.h
+++ /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)
diff --git a/test/fatalerrtest.c b/test/fatalerrtest.c
index a2538c5921..30930d9ce8 100644
--- a/test/fatalerrtest.c
+++ b/test/fatalerrtest.c
@@ -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>
 
diff --git a/test/gosttest.c b/test/gosttest.c
index b61e4efa49..84c5e6c501 100644
--- a/test/gosttest.c
+++ b/test/gosttest.c
@@ -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"
 
diff --git a/test/cmp_testlib.c b/test/helpers/cmp_testlib.c
similarity index 100%
rename from test/cmp_testlib.c
rename to test/helpers/cmp_testlib.c
diff --git a/test/cmp_testlib.h b/test/helpers/cmp_testlib.h
similarity index 95%
rename from test/cmp_testlib.h
rename to test/helpers/cmp_testlib.h
index e4361b198a..0bee099a67 100644
--- a/test/cmp_testlib.h
+++ b/test/helpers/cmp_testlib.h
@@ -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 */
diff --git a/test/handshake_helper.c b/test/helpers/handshake.c
similarity index 99%
rename from test/handshake_helper.c
rename to test/helpers/handshake.c
index 5253f0d602..08fcd39bea 100644
--- a/test/handshake_helper.c
+++ b/test/helpers/handshake.c
@@ -16,11 +16,11 @@
 #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>
diff --git a/test/handshake_helper.h b/test/helpers/handshake.h
similarity index 100%
rename from test/handshake_helper.h
rename to test/helpers/handshake.h
diff --git a/test/pkcs12_helper.c b/test/helpers/pkcs12.c
similarity index 99%
rename from test/pkcs12_helper.c
rename to test/helpers/pkcs12.c
index dd64a2a716..6489609d25 100644
--- a/test/pkcs12_helper.c
+++ b/test/helpers/pkcs12.c
@@ -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;
diff --git a/test/pkcs12_helper.h b/test/helpers/pkcs12.h
similarity index 99%
rename from test/pkcs12_helper.h
rename to test/helpers/pkcs12.h
index 8ae640d7f8..01e1cf1595 100644
--- a/test/pkcs12_helper.h
+++ b/test/helpers/pkcs12.h
@@ -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;
diff --git a/test/predefined_dhparams.c b/test/helpers/predefined_dhparams.c
similarity index 100%
rename from test/predefined_dhparams.c
rename to test/helpers/predefined_dhparams.c
diff --git a/test/predefined_dhparams.h b/test/helpers/predefined_dhparams.h
similarity index 100%
rename from test/predefined_dhparams.h
rename to test/helpers/predefined_dhparams.h
diff --git a/test/ssl_test_ctx.c b/test/helpers/ssl_test_ctx.c
similarity index 99%
rename from test/ssl_test_ctx.c
rename to test/helpers/ssl_test_ctx.c
index 5c3de4c436..db4752c54f 100644
--- a/test/ssl_test_ctx.c
+++ b/test/helpers/ssl_test_ctx.c
@@ -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
diff --git a/test/ssl_test_ctx.h b/test/helpers/ssl_test_ctx.h
similarity index 100%
rename from test/ssl_test_ctx.h
rename to test/helpers/ssl_test_ctx.h
diff --git a/test/ssltestlib.c b/test/helpers/ssltestlib.c
similarity index 99%
rename from test/ssltestlib.c
rename to test/helpers/ssltestlib.c
index 1fbe51763b..2366c3db4d 100644
--- a/test/ssltestlib.c
+++ b/test/helpers/ssltestlib.c
@@ -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
diff --git a/test/ssltestlib.h b/test/helpers/ssltestlib.h
similarity index 100%
rename from test/ssltestlib.h
rename to test/helpers/ssltestlib.h
diff --git a/test/pkcs12_format_test.c b/test/pkcs12_format_test.c
index 4b638af82d..8b1448f19c 100644
--- a/test/pkcs12_format_test.c
+++ b/test/pkcs12_format_test.c
@@ -19,7 +19,7 @@
 #include <openssl/pem.h>
 
 #include "testutil.h"
-#include "pkcs12_helper.h"
+#include "helpers/pkcs12.h"
 
 
 /* --------------------------------------------------------------------------
diff --git a/test/recipes/80-test_ssl_old.t b/test/recipes/80-test_ssl_old.t
index aa2428559f..4e3c0998a2 100644
--- a/test/recipes/80-test_ssl_old.t
+++ b/test/recipes/80-test_ssl_old.t
@@ -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');
 	  }
 
diff --git a/test/recordlentest.c b/test/recordlentest.c
index cfd1a7cbf5..5388db7ddd 100644
--- a/test/recordlentest.c
+++ b/test/recordlentest.c
@@ -9,7 +9,7 @@
 
 #include <string.h>
 
-#include "ssltestlib.h"
+#include "helpers/ssltestlib.h"
 #include "testutil.h"
 
 static char *cert = NULL;
diff --git a/test/servername_test.c b/test/servername_test.c
index cf9cdd174a..14088211c9 100644
--- a/test/servername_test.c
+++ b/test/servername_test.c
@@ -22,7 +22,7 @@
 
 #include "testutil.h"
 #include "internal/nelem.h"
-#include "ssltestlib.h"
+#include "helpers/ssltestlib.h"
 
 #define CLIENT_VERSION_LEN      2
 
diff --git a/test/ssltest_old.c b/test/ssl_old_test.c
similarity index 99%
rename from test/ssltest_old.c
rename to test/ssl_old_test.c
index 794d878675..54b1ca4236 100644
--- a/test/ssltest_old.c
+++ b/test/ssl_old_test.c
@@ -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;
diff --git a/test/ssl_test.c b/test/ssl_test.c
index d902283edf..09141b2fed 100644
--- a/test/ssl_test.c
+++ b/test/ssl_test.c
@@ -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;
diff --git a/test/ssl_test_ctx_test.c b/test/ssl_test_ctx_test.c
index 91f418095f..7579b4b12a 100644
--- a/test/ssl_test_ctx_test.c
+++ b/test/ssl_test_ctx_test.c
@@ -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>
diff --git a/test/sslapitest.c b/test/sslapitest.c
index 19421947de..158295c034 100644
--- a/test/sslapitest.c
+++ b/test/sslapitest.c
@@ -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"
diff --git a/test/sslbuffertest.c b/test/sslbuffertest.c
index 3d034d6041..3c3e69d61d 100644
--- a/test/sslbuffertest.c
+++ b/test/sslbuffertest.c
@@ -15,7 +15,7 @@
 
 #include "internal/packet.h"
 
-#include "ssltestlib.h"
+#include "helpers/ssltestlib.h"
 #include "testutil.h"
 
 struct async_ctrs {
diff --git a/test/sslcorrupttest.c b/test/sslcorrupttest.c
index 97d235c8ad..d270d42351 100644
--- a/test/sslcorrupttest.c
+++ b/test/sslcorrupttest.c
@@ -8,7 +8,7 @@
  */
 
 #include <string.h>
-#include "ssltestlib.h"
+#include "helpers/ssltestlib.h"
 #include "testutil.h"
 
 static int docorrupt = 0;
diff --git a/test/testutil/output_helpers.c b/test/testutil/output.c
similarity index 100%
rename from test/testutil/output_helpers.c
rename to test/testutil/output.c
diff --git a/test/tls13ccstest.c b/test/tls13ccstest.c
index 3a81ceba22..3a3fa8c22a 100644
--- a/test/tls13ccstest.c
+++ b/test/tls13ccstest.c
@@ -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"
 


More information about the openssl-commits mailing list