[openssl] master update

Matt Caswell matt at openssl.org
Mon Nov 11 09:40:45 UTC 2019


The branch master has been updated
       via  f650ab4738107d01925bd4d9043e18bf27ba2dcd (commit)
      from  8fece3355a76bf9c82d13b5389f88a3649c1e547 (commit)


- Log -----------------------------------------------------------------
commit f650ab4738107d01925bd4d9043e18bf27ba2dcd
Author: Matt Caswell <matt at openssl.org>
Date:   Thu Nov 7 09:24:18 2019 +0000

    Fix no-dsa
    
    Make sure we don't try and load a DSA key in the tests if DSA has been
    disabled.
    
    Reviewed-by: Shane Lontis <shane.lontis at oracle.com>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/10375)

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

Summary of changes:
 test/evp_extra_test.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/test/evp_extra_test.c b/test/evp_extra_test.c
index e7409619fd..f4e792fb1d 100644
--- a/test/evp_extra_test.c
+++ b/test/evp_extra_test.c
@@ -88,6 +88,7 @@ static const unsigned char kExampleRSAKeyDER[] = {
 * kExampleDSAKeyDER is a DSA private key in ASN.1, DER format. Of course, you
  * should never use this key anywhere but in an example.
  */
+#ifndef OPENSSL_NO_DSA
 static const unsigned char kExampleDSAKeyDER[] = {
     0x30, 0x82, 0x01, 0xba, 0x02, 0x01, 0x00, 0x02, 0x81, 0x81, 0x00, 0x9a,
     0x05, 0x6d, 0x33, 0xcd, 0x5d, 0x78, 0xa1, 0xbb, 0xcb, 0x7d, 0x5b, 0x8d,
@@ -128,6 +129,7 @@ static const unsigned char kExampleDSAKeyDER[] = {
     0xf1, 0x8c, 0x82, 0x97, 0xf2, 0xf4, 0x19, 0xba, 0x2b, 0xf3, 0x16, 0xbe,
     0x40, 0x48
 };
+#endif
 
 /*
  * kExampleBadRSAKeyDER is an RSA private key in ASN.1, DER format. The private
@@ -422,6 +424,7 @@ end:
     return ret;
 }
 
+#ifndef OPENSSL_NO_DSA
 static EVP_PKEY *load_example_dsa_key(void)
 {
     EVP_PKEY *ret = NULL;
@@ -445,7 +448,7 @@ end:
 
     return ret;
 }
-
+#endif
 
 static int test_EVP_Enveloped(void)
 {
@@ -525,8 +528,13 @@ static int test_EVP_DigestSignInit(int tst)
         if (!TEST_ptr(pkey = load_example_rsa_key()))
                 goto out;
     } else {
+#ifndef OPENSSL_NO_DSA
         if (!TEST_ptr(pkey = load_example_dsa_key()))
                 goto out;
+#else
+        ret = 1;
+        goto out;
+#endif
     }
 
     if (!TEST_true(EVP_DigestSignInit(md_ctx, NULL, EVP_sha256(), NULL, pkey)))


More information about the openssl-commits mailing list