summaryrefslogtreecommitdiffstats
path: root/crypto/evp/evp_enc.c
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2019-10-16 16:18:42 +1000
committerShane Lontis <shane.lontis@oracle.com>2019-10-16 16:18:42 +1000
commit3d5a7578e09a984c6475b1c008f5c76f850328cb (patch)
tree0ec32eba328e21a6e1face34415c67dcdce365c2 /crypto/evp/evp_enc.c
parent64fd90fbe99dde18de3fc7c3a6b06793d87a4aad (diff)
Add ChaCha related ciphers to default provider
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10081)
Diffstat (limited to 'crypto/evp/evp_enc.c')
-rw-r--r--crypto/evp/evp_enc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c
index 5a6a4033ce..18adc5b586 100644
--- a/crypto/evp/evp_enc.c
+++ b/crypto/evp/evp_enc.c
@@ -278,6 +278,8 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
case NID_rc2_64_cbc:
case NID_rc2_cfb64:
case NID_rc2_ofb64:
+ case NID_chacha20:
+ case NID_chacha20_poly1305:
break;
default:
goto legacy;
@@ -1120,6 +1122,11 @@ int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr)
params[0] = OSSL_PARAM_construct_octet_string(OSSL_CIPHER_PARAM_AEAD_TAG,
ptr, sz);
break;
+ case EVP_CTRL_AEAD_SET_MAC_KEY:
+ params[0] =
+ OSSL_PARAM_construct_octet_string(OSSL_CIPHER_PARAM_AEAD_MAC_KEY,
+ ptr, sz);
+ break;
case EVP_CTRL_AEAD_TLS1_AAD:
/* This one does a set and a get - since it returns a padding size */
params[0] =