[openssl] OpenSSL_1_1_1-stable update

bernd.edlinger at hotmail.de bernd.edlinger at hotmail.de
Sat Aug 28 14:50:01 UTC 2021


The branch OpenSSL_1_1_1-stable has been updated
       via  dc3520b1ad3e1d70b899210bacc002318ebe276a (commit)
      from  876b7e97b848ba179c1dbe4a4a265dfffae0eba6 (commit)


- Log -----------------------------------------------------------------
commit dc3520b1ad3e1d70b899210bacc002318ebe276a
Author: Bernd Edlinger <bernd.edlinger at hotmail.de>
Date:   Fri Aug 27 13:11:39 2021 +0200

    Fix the "Out of memory" EVP KDF scrypt test
    
    This test did not really execute, since usually
    the OPENSSL_malloc(0) will fail and prevent the
    execution of the KDF.
    
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/16446)

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

Summary of changes:
 test/evp_test.c                          | 2 +-
 test/recipes/30-test_evp_data/evpkdf.txt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/evp_test.c b/test/evp_test.c
index abb51384e8..d4cca6dbcb 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -1777,7 +1777,7 @@ static int kdf_test_run(EVP_TEST *t)
     unsigned char *got = NULL;
     size_t got_len = expected->output_len;
 
-    if (!TEST_ptr(got = OPENSSL_malloc(got_len))) {
+    if (!TEST_ptr(got = OPENSSL_malloc(got_len == 0 ? 1 : got_len))) {
         t->err = "INTERNAL_ERROR";
         goto err;
     }
diff --git a/test/recipes/30-test_evp_data/evpkdf.txt b/test/recipes/30-test_evp_data/evpkdf.txt
index 9a6cc28385..8fe0df3972 100644
--- a/test/recipes/30-test_evp_data/evpkdf.txt
+++ b/test/recipes/30-test_evp_data/evpkdf.txt
@@ -301,5 +301,5 @@ Ctrl.salt = salt:SodiumChloride
 Ctrl.N = N:1048576
 Ctrl.r = r:8
 Ctrl.p = p:1
-Result = INTERNAL_ERROR
+Result = KDF_MISMATCH
 


More information about the openssl-commits mailing list