diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-11-17 14:17:28 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-11-17 19:45:42 +0100 |
commit | b6c6898234a12b9c6cdaa8f16fb9156097649ad7 (patch) | |
tree | d89db544e30df9ece1e2df78da72ef1727b6417d /apps/rsa.c | |
parent | sha/asm/sha512-armv8.pl: fix big-endian support in __KERNEL__ case. (diff) | |
download | openssl-b6c6898234a12b9c6cdaa8f16fb9156097649ad7.tar.xz openssl-b6c6898234a12b9c6cdaa8f16fb9156097649ad7.zip |
Support MSBLOB format if RC4 is disabled
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'apps/rsa.c')
-rw-r--r-- | apps/rsa.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/rsa.c b/apps/rsa.c index 73579a61a6..5462f4bc2b 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 { |