[openssl-commits] [openssl] OpenSSL_1_1_1-stable update
matthias.st.pierre at ncp-e.com
matthias.st.pierre at ncp-e.com
Thu Nov 8 15:33:14 UTC 2018
The branch OpenSSL_1_1_1-stable has been updated
via cdf33504efb9cb429a920d4d6bfd30b9c7cd4bf8 (commit)
via c39df745b08d9d9e8ae323a2b017db1961f5c0b8 (commit)
from efd67e01a5471f9b0745018d7707b69876b070f6 (commit)
- Log -----------------------------------------------------------------
commit cdf33504efb9cb429a920d4d6bfd30b9c7cd4bf8
Author: Dr. Matthias St. Pierre <Matthias.St.Pierre at ncp-e.com>
Date: Fri Oct 26 01:13:19 2018 +0200
Test: enable internal tests for shared Windows builds
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7462)
(cherry picked from commit 1901516a4ba909fff12e0e7815aa2d499f4d6d67)
commit c39df745b08d9d9e8ae323a2b017db1961f5c0b8
Author: Dr. Matthias St. Pierre <Matthias.St.Pierre at ncp-e.com>
Date: Mon Oct 22 18:05:14 2018 +0200
Test: link drbgtest statically against libcrypto
and remove duplicate rand_drbg_seedlen() implementation again.
Reviewed-by: Richard Levitte <levitte at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7462)
(cherry picked from commit 1c615e4ce97715ae3af9255bc57be32a49687966)
-----------------------------------------------------------------------
Summary of changes:
crypto/rand/drbg_lib.c | 6 +---
crypto/rand/rand_lcl.h | 2 +-
test/build.info | 2 +-
test/drbgtest.c | 40 --------------------------
test/recipes/02-test_internal_ctype.t | 3 --
test/recipes/03-test_internal_asn1.t | 3 --
test/recipes/03-test_internal_chacha.t | 3 --
test/recipes/03-test_internal_curve448.t | 3 --
test/recipes/03-test_internal_modes.t | 3 --
test/recipes/03-test_internal_poly1305.t | 3 --
test/recipes/03-test_internal_siphash.t | 3 --
test/recipes/03-test_internal_sm2.t | 3 --
test/recipes/03-test_internal_sm4.t | 3 --
test/recipes/03-test_internal_ssl_cert_table.t | 3 --
test/recipes/03-test_internal_x509.t | 3 --
test/recipes/06-test-rdrand.t | 3 --
test/recipes/90-test_tls13encryption.t | 3 --
17 files changed, 3 insertions(+), 86 deletions(-)
diff --git a/crypto/rand/drbg_lib.c b/crypto/rand/drbg_lib.c
index c1d89f8..a132821 100644
--- a/crypto/rand/drbg_lib.c
+++ b/crypto/rand/drbg_lib.c
@@ -974,12 +974,8 @@ static int drbg_bytes(unsigned char *out, int count)
* Calculates the minimum length of a full entropy buffer
* which is necessary to seed (i.e. instantiate) the DRBG
* successfully.
- *
- * NOTE: There is a copy of this function in drbgtest.c.
- * If you change anything here, you need to update
- * the copy accordingly.
*/
-static size_t rand_drbg_seedlen(RAND_DRBG *drbg)
+size_t rand_drbg_seedlen(RAND_DRBG *drbg)
{
/*
* If no os entropy source is available then RAND_seed(buffer, bufsize)
diff --git a/crypto/rand/rand_lcl.h b/crypto/rand/rand_lcl.h
index 9a4dc32..c3e9804 100644
--- a/crypto/rand/rand_lcl.h
+++ b/crypto/rand/rand_lcl.h
@@ -280,7 +280,7 @@ extern int rand_fork_count;
/* DRBG helpers */
int rand_drbg_restart(RAND_DRBG *drbg,
const unsigned char *buffer, size_t len, size_t entropy);
-
+size_t rand_drbg_seedlen(RAND_DRBG *drbg);
/* locking api */
int rand_drbg_lock(RAND_DRBG *drbg);
int rand_drbg_unlock(RAND_DRBG *drbg);
diff --git a/test/build.info b/test/build.info
index b2a82a7..b6bb711 100644
--- a/test/build.info
+++ b/test/build.info
@@ -341,7 +341,7 @@ INCLUDE_MAIN___test_libtestutil_OLB = /INCLUDE=MAIN
SOURCE[drbgtest]=drbgtest.c
INCLUDE[drbgtest]=../include
- DEPEND[drbgtest]=../libcrypto libtestutil.a
+ DEPEND[drbgtest]=../libcrypto.a libtestutil.a
SOURCE[drbg_cavs_test]=drbg_cavs_test.c drbg_cavs_data.c
INCLUDE[drbg_cavs_test]=../include . ..
diff --git a/test/drbgtest.c b/test/drbgtest.c
index 755f0b3..b690475 100644
--- a/test/drbgtest.c
+++ b/test/drbgtest.c
@@ -892,46 +892,6 @@ static int test_multi_thread(void)
}
#endif
-#ifdef OPENSSL_RAND_SEED_NONE
-/*
- * Calculates the minimum buffer length which needs to be
- * provided to RAND_seed() in order to successfully
- * instantiate the DRBG.
- *
- * Copied from rand_drbg_seedlen() in rand_drbg.c
- */
-static size_t rand_drbg_seedlen(RAND_DRBG *drbg)
-{
- /*
- * If no os entropy source is available then RAND_seed(buffer, bufsize)
- * is expected to succeed if and only if the buffer length satisfies
- * the following requirements, which follow from the calculations
- * in RAND_DRBG_instantiate().
- */
- size_t min_entropy = drbg->strength;
- size_t min_entropylen = drbg->min_entropylen;
-
- /*
- * Extra entropy for the random nonce in the absence of a
- * get_nonce callback, see comment in RAND_DRBG_instantiate().
- */
- if (drbg->min_noncelen > 0 && drbg->get_nonce == NULL) {
- min_entropy += drbg->strength / 2;
- min_entropylen += drbg->min_noncelen;
- }
-
- /*
- * Convert entropy requirement from bits to bytes
- * (dividing by 8 without rounding upwards, because
- * all entropy requirements are divisible by 8).
- */
- min_entropy >>= 3;
-
- /* Return a value that satisfies both requirements */
- return min_entropy > min_entropylen ? min_entropy : min_entropylen;
-}
-#endif /*OPENSSL_RAND_SEED_NONE*/
-
/*
* Test that instantiation with RAND_seed() works as expected
*
diff --git a/test/recipes/02-test_internal_ctype.t b/test/recipes/02-test_internal_ctype.t
index 5bf81bd..9990021 100644
--- a/test/recipes/02-test_internal_ctype.t
+++ b/test/recipes/02-test_internal_ctype.t
@@ -14,7 +14,4 @@ use OpenSSL::Test::Utils;
setup("test_internal_ctype");
-plan skip_all => "This test is unsupported in a shared library build on Windows"
- if $^O eq 'MSWin32' && !disabled("shared");
-
simple_test("test_internal_ctype", "ctype_internal_test");
diff --git a/test/recipes/03-test_internal_asn1.t b/test/recipes/03-test_internal_asn1.t
index d34445f..f6f3b5c 100644
--- a/test/recipes/03-test_internal_asn1.t
+++ b/test/recipes/03-test_internal_asn1.t
@@ -13,7 +13,4 @@ use OpenSSL::Test::Utils;
setup("test_internal_asn1");
-plan skip_all => "This test is unsupported in a shared library build on Windows"
- if $^O eq 'MSWin32' && !disabled("shared");
-
simple_test("test_internal_asn1", "asn1_internal_test");
diff --git a/test/recipes/03-test_internal_chacha.t b/test/recipes/03-test_internal_chacha.t
index bac1328..14ec5c6 100644
--- a/test/recipes/03-test_internal_chacha.t
+++ b/test/recipes/03-test_internal_chacha.t
@@ -13,7 +13,4 @@ use OpenSSL::Test::Utils;
setup("test_internal_chacha");
-plan skip_all => "This test is unsupported in a shared library build on Windows"
- if $^O eq 'MSWin32' && !disabled("shared");
-
simple_test("test_internal_chacha", "chacha_internal_test", "chacha");
diff --git a/test/recipes/03-test_internal_curve448.t b/test/recipes/03-test_internal_curve448.t
index fb41a6b..4decc98 100644
--- a/test/recipes/03-test_internal_curve448.t
+++ b/test/recipes/03-test_internal_curve448.t
@@ -13,9 +13,6 @@ use OpenSSL::Test::Utils;
setup("test_internal_curve448");
-plan skip_all => "This test is unsupported in a shared library build on Windows"
- if $^O eq 'MSWin32' && !disabled("shared");
-
plan skip_all => "This test is unsupported in a no-ec build"
if disabled("ec");
diff --git a/test/recipes/03-test_internal_modes.t b/test/recipes/03-test_internal_modes.t
index 4371822..09c0664 100644
--- a/test/recipes/03-test_internal_modes.t
+++ b/test/recipes/03-test_internal_modes.t
@@ -13,7 +13,4 @@ use OpenSSL::Test::Utils;
setup("test_internal_modes");
-plan skip_all => "This test is unsupported in a shared library build on Windows"
- if $^O eq 'MSWin32' && !disabled("shared");
-
simple_test("test_internal_modes", "modes_internal_test");
diff --git a/test/recipes/03-test_internal_poly1305.t b/test/recipes/03-test_internal_poly1305.t
index b5809c1..a3b9849 100644
--- a/test/recipes/03-test_internal_poly1305.t
+++ b/test/recipes/03-test_internal_poly1305.t
@@ -13,7 +13,4 @@ use OpenSSL::Test::Utils;
setup("test_internal_poly1305");
-plan skip_all => "This test is unsupported in a shared library build on Windows"
- if $^O eq 'MSWin32' && !disabled("shared");
-
simple_test("test_internal_poly1305", "poly1305_internal_test", "poly1305");
diff --git a/test/recipes/03-test_internal_siphash.t b/test/recipes/03-test_internal_siphash.t
index 1817e4e..f5e8890 100644
--- a/test/recipes/03-test_internal_siphash.t
+++ b/test/recipes/03-test_internal_siphash.t
@@ -13,7 +13,4 @@ use OpenSSL::Test::Utils;
setup("test_internal_siphash");
-plan skip_all => "This test is unsupported in a shared library build on Windows"
- if $^O eq 'MSWin32' && !disabled("shared");
-
simple_test("test_internal_siphash", "siphash_internal_test", "siphash");
diff --git a/test/recipes/03-test_internal_sm2.t b/test/recipes/03-test_internal_sm2.t
index b93716e..7a3fc41 100644
--- a/test/recipes/03-test_internal_sm2.t
+++ b/test/recipes/03-test_internal_sm2.t
@@ -13,7 +13,4 @@ use OpenSSL::Test::Utils;
setup("test_internal_sm2");
-plan skip_all => "This test is unsupported in a shared library build on Windows"
- if $^O eq 'MSWin32' && !disabled("shared");
-
simple_test("test_internal_sm2", "sm2_internal_test", "sm2");
diff --git a/test/recipes/03-test_internal_sm4.t b/test/recipes/03-test_internal_sm4.t
index 459d83c..34de203 100644
--- a/test/recipes/03-test_internal_sm4.t
+++ b/test/recipes/03-test_internal_sm4.t
@@ -14,7 +14,4 @@ use OpenSSL::Test::Utils;
setup("test_internal_sm4");
-plan skip_all => "This test is unsupported in a shared library build on Windows"
- if $^O eq 'MSWin32' && !disabled("shared");
-
simple_test("test_internal_sm4", "sm4_internal_test", "sm4");
diff --git a/test/recipes/03-test_internal_ssl_cert_table.t b/test/recipes/03-test_internal_ssl_cert_table.t
index 1cafc23..8872cd5 100644
--- a/test/recipes/03-test_internal_ssl_cert_table.t
+++ b/test/recipes/03-test_internal_ssl_cert_table.t
@@ -13,7 +13,4 @@ use OpenSSL::Test::Utils;
setup("test_internal_ssl_cert_table");
-plan skip_all => "This test is unsupported in a shared library build on Windows"
- if $^O eq 'MSWin32' && !disabled("shared");
-
simple_test("test_internal_ssl_cert_table", "ssl_cert_table_internal_test");
diff --git a/test/recipes/03-test_internal_x509.t b/test/recipes/03-test_internal_x509.t
index d4aaa22..ef140eb 100644
--- a/test/recipes/03-test_internal_x509.t
+++ b/test/recipes/03-test_internal_x509.t
@@ -13,7 +13,4 @@ use OpenSSL::Test::Utils;
setup("test_internal_x509");
-plan skip_all => "This test is unsupported in a shared library build on Windows"
- if $^O eq 'MSWin32' && !disabled("shared");
-
simple_test("test_internal_x509", "x509_internal_test");
diff --git a/test/recipes/06-test-rdrand.t b/test/recipes/06-test-rdrand.t
index ac246bd..24be8ae 100644
--- a/test/recipes/06-test-rdrand.t
+++ b/test/recipes/06-test-rdrand.t
@@ -15,9 +15,6 @@ use OpenSSL::Test::Utils;
setup("test_rdrand_sanity");
-plan skip_all => "This test is unsupported in a shared library build on Windows"
- if $^O eq 'MSWin32' && !disabled("shared");
-
# We also need static builds to be enabled even on linux
plan skip_all => "This test is unsupported if static builds are not enabled"
if disabled("static");
diff --git a/test/recipes/90-test_tls13encryption.t b/test/recipes/90-test_tls13encryption.t
index f997b4d..e6ca97a 100644
--- a/test/recipes/90-test_tls13encryption.t
+++ b/test/recipes/90-test_tls13encryption.t
@@ -15,9 +15,6 @@ setup($test_name);
plan skip_all => "$test_name is not supported in this build"
if disabled("tls1_3");
-plan skip_all => "This test is unsupported in a shared library build on Windows"
- if $^O eq 'MSWin32' && !disabled("shared");
-
plan tests => 1;
ok(run(test(["tls13encryptiontest"])), "running tls13encryptiontest");
More information about the openssl-commits
mailing list