[openssl] master update

Dr. Paul Dale pauli at openssl.org
Wed May 26 00:20:53 UTC 2021


The branch master has been updated
       via  9080ed2175532df8ecee4a2de9979037133d2601 (commit)
      from  b8c09a893c00588ea4e5ea615b9b0d117e952144 (commit)


- Log -----------------------------------------------------------------
commit 9080ed2175532df8ecee4a2de9979037133d2601
Author: Petr Gotthard <petr.gotthard at centrum.cz>
Date:   Mon May 24 11:40:15 2021 +0200

    Fix building of test/pbetest.c
    
    The test_pkcs5_pbe() function is required twice:
    once `if !defined OPENSSL_NO_RC4 && !defined OPENSSL_NO_MD5`
    and once `if !defined OPENSSL_NO_DES && !defined OPENSSL_NO_SHA1`
    
    Hence there should be `||` between those. Currently the build fails
    if the first condition is false, while the second is true.
    
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    Reviewed-by: Paul Dale <pauli at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15432)

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

Summary of changes:
 test/pbetest.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/test/pbetest.c b/test/pbetest.c
index 81dbfc1388..33d23d4b71 100644
--- a/test/pbetest.c
+++ b/test/pbetest.c
@@ -16,9 +16,8 @@
 #include <openssl/rc4.h>
 #include <openssl/md5.h>
 
-#if !defined OPENSSL_NO_RC4 && !defined OPENSSL_NO_MD5
-# if !defined OPENSSL_NO_DES && !defined OPENSSL_NO_SHA1
-
+#if !defined OPENSSL_NO_RC4 && !defined OPENSSL_NO_MD5 \
+    || !defined OPENSSL_NO_DES && !defined OPENSSL_NO_SHA1
 static const char pbe_password[] = "MyVoiceIsMyPassport";
 
 static unsigned char pbe_salt[] = {
@@ -32,7 +31,6 @@ static unsigned char pbe_plaintext[] = {
     0x6c, 0x6c, 0x20, 0x6d, 0x61, 0x64, 0x65, 0x20,
     0x6f, 0x66, 0x20, 0x73, 0x74, 0x61, 0x72, 0x73,
 };
-# endif
 #endif
 
 /* Expected output generated using OpenSSL 1.1.1 */
@@ -54,8 +52,8 @@ static const unsigned char pbe_ciphertext_des_sha1[] = {
 };
 #endif
 
-#if !defined OPENSSL_NO_RC4 && !defined OPENSSL_NO_MD5
-# if !defined OPENSSL_NO_DES && !defined OPENSSL_NO_SHA1
+#if !defined OPENSSL_NO_RC4 && !defined OPENSSL_NO_MD5 \
+    || !defined OPENSSL_NO_DES && !defined OPENSSL_NO_SHA1
 static int test_pkcs5_pbe(const EVP_CIPHER *cipher, const EVP_MD *md,
                           const unsigned char *exp, const int exp_len)
 {
@@ -109,7 +107,6 @@ err:
     X509_ALGOR_free(algor);
     return ret;
 }
-# endif
 #endif
 
 #if !defined OPENSSL_NO_RC4 && !defined OPENSSL_NO_MD5


More information about the openssl-commits mailing list