diff options
author | Richard Levitte <levitte@openssl.org> | 2016-10-19 22:54:06 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-10-19 22:54:06 +0200 |
commit | 10e60f26cef02a6310d20cc2c918184fc9100d14 (patch) | |
tree | cb886682540011b3cfeeb622bf710aec3e038f63 /crypto/cms | |
parent | 1c6aab6a527b057133b470fa8c778e3d45f1605a (diff) |
Fix no-des
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1748)
Diffstat (limited to 'crypto/cms')
-rw-r--r-- | crypto/cms/cms_kari.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/cms/cms_kari.c b/crypto/cms/cms_kari.c index 2cfcdb29cd..ee283172d3 100644 --- a/crypto/cms/cms_kari.c +++ b/crypto/cms/cms_kari.c @@ -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(); |