[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

Dr. Stephen Henson steve at openssl.org
Thu Nov 17 19:08:08 UTC 2016


The branch OpenSSL_1_1_0-stable has been updated
       via  e597b2ba1165bb94e384f5cd37ea359f926a05cc (commit)
      from  3ead66d1c0ce8e16ea2d4a1447c42073d7773e88 (commit)


- Log -----------------------------------------------------------------
commit e597b2ba1165bb94e384f5cd37ea359f926a05cc
Author: Dr. Stephen Henson <steve at openssl.org>
Date:   Thu Nov 17 13:17:28 2016 +0000

    Support MSBLOB format if RC4 is disabled
    
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (cherry picked from commit b6c6898234a12b9c6cdaa8f16fb9156097649ad7)

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

Summary of changes:
 apps/dsa.c | 8 +++++++-
 apps/rsa.c | 8 +++++++-
 2 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/apps/dsa.c b/apps/dsa.c
index 273f8d0..9c93549 100644
--- a/apps/dsa.c
+++ b/apps/dsa.c
@@ -213,7 +213,7 @@ int dsa_main(int argc, char **argv)
             i = PEM_write_bio_DSAPrivateKey(out, dsa, enc,
                                             NULL, 0, NULL, passout);
         }
-# if !defined(OPENSSL_NO_RSA) && !defined(OPENSSL_NO_RC4)
+# ifndef OPENSSL_NO_RSA
     } else if (outformat == FORMAT_MSBLOB || outformat == FORMAT_PVK) {
         EVP_PKEY *pk;
         pk = EVP_PKEY_new();
@@ -225,7 +225,13 @@ int dsa_main(int argc, char **argv)
                 goto end;
             }
             assert(private);
+#  ifdef OPENSSL_NO_RC4
+            BIO_printf(bio_err, "PVK format not supported\n");
+            EVP_PKEY_free(pk);
+            goto end;
+#  else
             i = i2b_PVK_bio(out, pk, pvk_encr, 0, passout);
+#  endif
         }
         else if (pubin || pubout)
             i = i2b_PublicKey_bio(out, pk);
diff --git a/apps/rsa.c b/apps/rsa.c
index c3a494d..35ab727 100644
--- a/apps/rsa.c
+++ b/apps/rsa.c
@@ -263,7 +263,7 @@ int rsa_main(int argc, char **argv)
             i = PEM_write_bio_RSAPrivateKey(out, rsa,
                                             enc, NULL, 0, NULL, passout);
         }
-# if !defined(OPENSSL_NO_DSA) && !defined(OPENSSL_NO_RC4)
+# ifndef OPENSSL_NO_DSA
     } else if (outformat == FORMAT_MSBLOB || outformat == FORMAT_PVK) {
         EVP_PKEY *pk;
         pk = EVP_PKEY_new();
@@ -275,7 +275,13 @@ int rsa_main(int argc, char **argv)
                 goto end;
             }
             assert(private);
+#  ifdef OPENSSL_NO_RC4
+            BIO_printf(bio_err, "PVK format not supported\n");
+            EVP_PKEY_free(pk);
+            goto end;
+#  else
             i = i2b_PVK_bio(out, pk, pvk_encr, 0, passout);
+#  endif
         } else if (pubin || pubout) {
             i = i2b_PublicKey_bio(out, pk);
         } else {


More information about the openssl-commits mailing list