Fix no-des
authorRichard Levitte <levitte@openssl.org>
Wed, 19 Oct 2016 20:54:06 +0000 (22:54 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 19 Oct 2016 20:54:06 +0000 (22:54 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1748)

apps/pkcs12.c
crypto/cms/cms_kari.c

index 82182c2..4e7de43 100644 (file)
@@ -1110,4 +1110,6 @@ static int set_pbe(BIO *err, int *ppbe, const char *str)
     return 1;
 }
 
+#else
+static void *dummy = &dummy;
 #endif
index 2cfcdb2..ee28317 100644 (file)
@@ -401,9 +401,12 @@ static int cms_wrap_init(CMS_KeyAgreeRecipientInfo *kari,
      * Pick a cipher based on content encryption cipher. If it is DES3 use
      * DES3 wrap otherwise use AES wrap similar to key size.
      */
+#ifndef OPENSSL_NO_DES
     if (EVP_CIPHER_type(cipher) == NID_des_ede3_cbc)
         kekcipher = EVP_des_ede3_wrap();
-    else if (keylen <= 16)
+    else
+#endif
+    if (keylen <= 16)
         kekcipher = EVP_aes_128_wrap();
     else if (keylen <= 24)
         kekcipher = EVP_aes_192_wrap();