diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2019-10-08 16:42:28 +1000 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2019-10-08 16:42:28 +1000 |
commit | f816aa47ac140c3d083416aa9c1c396096d9a92c (patch) | |
tree | 4f05808fdef6fe5a921b00739a31f8e79f8ac403 /crypto/evp/evp_enc.c | |
parent | 089cb623be76b88a1eea6fcd135101037661bbc3 (diff) |
Add rc2 ciphers to default provider
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9991)
Diffstat (limited to 'crypto/evp/evp_enc.c')
-rw-r--r-- | crypto/evp/evp_enc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index 2a22336a36..5a6a4033ce 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -273,6 +273,11 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, case NID_rc5_ecb: case NID_rc5_cfb64: case NID_rc5_ofb64: + case NID_rc2_cbc: + case NID_rc2_40_cbc: + case NID_rc2_64_cbc: + case NID_rc2_cfb64: + case NID_rc2_ofb64: break; default: goto legacy; @@ -1129,6 +1134,13 @@ int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr) if (ret <= 0) return 0; return sz; +#ifndef OPENSSL_NO_RC2 + case EVP_CTRL_GET_RC2_KEY_BITS: + set_params = 0; /* Fall thru */ + case EVP_CTRL_SET_RC2_KEY_BITS: + params[0] = OSSL_PARAM_construct_size_t(OSSL_CIPHER_PARAM_RC2_KEYBITS, &sz); + break; +#endif /* OPENSSL_NO_RC2 */ } if (set_params) |