summaryrefslogtreecommitdiff
path: root/deps/openssl/openssl/crypto/evp/e_chacha20_poly1305.c
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2019-09-13 08:55:54 -0700
committerSam Roberts <vieuxtech@gmail.com>2019-10-01 11:07:43 -0700
commit17d1d164418552089fcd72568e97a88b17ec1d21 (patch)
tree3cafb16ee95930be56fb17704c270a9909ae2d44 /deps/openssl/openssl/crypto/evp/e_chacha20_poly1305.c
parent7ce316e6a263f313489eea2150bfde228a7e3c41 (diff)
downloadandroid-node-v8-17d1d164418552089fcd72568e97a88b17ec1d21.tar.gz
android-node-v8-17d1d164418552089fcd72568e97a88b17ec1d21.tar.bz2
android-node-v8-17d1d164418552089fcd72568e97a88b17ec1d21.zip
deps: upgrade openssl sources to 1.1.1d
This updates all sources in deps/openssl/openssl by: $ cd deps/openssl/ $ rm -rf openssl $ tar zxf ~/tmp/openssl-1.1.0h.tar.gz $ mv openssl-1.1.0h openssl $ git add --all openssl $ git commit openssl PR-URL: https://github.com/nodejs/node/pull/29550 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'deps/openssl/openssl/crypto/evp/e_chacha20_poly1305.c')
-rw-r--r--deps/openssl/openssl/crypto/evp/e_chacha20_poly1305.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/deps/openssl/openssl/crypto/evp/e_chacha20_poly1305.c b/deps/openssl/openssl/crypto/evp/e_chacha20_poly1305.c
index 600365d2f0..435a38d365 100644
--- a/deps/openssl/openssl/crypto/evp/e_chacha20_poly1305.c
+++ b/deps/openssl/openssl/crypto/evp/e_chacha20_poly1305.c
@@ -534,6 +534,10 @@ static int chacha20_poly1305_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg,
}
return 1;
+ case EVP_CTRL_GET_IVLEN:
+ *(int *)ptr = actx->nonce_len;
+ return 1;
+
case EVP_CTRL_AEAD_SET_IVLEN:
if (arg <= 0 || arg > CHACHA20_POLY1305_MAX_IVLEN)
return 0;
@@ -613,7 +617,8 @@ static EVP_CIPHER chacha20_poly1305 = {
12, /* iv_len, 96-bit nonce in the context */
EVP_CIPH_FLAG_AEAD_CIPHER | EVP_CIPH_CUSTOM_IV |
EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CTRL_INIT |
- EVP_CIPH_CUSTOM_COPY | EVP_CIPH_FLAG_CUSTOM_CIPHER,
+ EVP_CIPH_CUSTOM_COPY | EVP_CIPH_FLAG_CUSTOM_CIPHER |
+ EVP_CIPH_CUSTOM_IV_LENGTH,
chacha20_poly1305_init_key,
chacha20_poly1305_cipher,
chacha20_poly1305_cleanup,