diff options
author | Robert Sloan <varomodt@google.com> | 2019-04-17 13:17:34 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-04-17 13:17:34 -0700 |
commit | 2669718082106ff65c13a73fc6f058e0713167b3 (patch) | |
tree | 5bfdfa9db8642d577ef86e52257844b934be87c4 /src/crypto/cipher_extra/e_aesgcmsiv.c | |
parent | 62c374e4170390cb3ca19cef283a8dc33c95211a (diff) | |
parent | f63bd1f440905963647c68a896db0c85e8914d11 (diff) | |
download | boringssl-2669718082106ff65c13a73fc6f058e0713167b3.tar.gz |
external/boringssl: Sync to c9827e073f64e353c4891ecc2c73721882543ee0.
am: f63bd1f440
Change-Id: I3b6a5db1dab391cd490dd40dfba716bd48359b39
Diffstat (limited to 'src/crypto/cipher_extra/e_aesgcmsiv.c')
-rw-r--r-- | src/crypto/cipher_extra/e_aesgcmsiv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/crypto/cipher_extra/e_aesgcmsiv.c b/src/crypto/cipher_extra/e_aesgcmsiv.c index 71a71fac..64febae4 100644 --- a/src/crypto/cipher_extra/e_aesgcmsiv.c +++ b/src/crypto/cipher_extra/e_aesgcmsiv.c @@ -426,6 +426,11 @@ static int aead_aes_gcm_siv_asm_open(const EVP_AEAD_CTX *ctx, uint8_t *out, return 0; } + if (nonce_len != EVP_AEAD_AES_GCM_SIV_NONCE_LEN) { + OPENSSL_PUT_ERROR(CIPHER, CIPHER_R_UNSUPPORTED_NONCE_SIZE); + return 0; + } + const struct aead_aes_gcm_siv_asm_ctx *gcm_siv_ctx = asm_ctx_from_ctx(ctx); const size_t plaintext_len = in_len - EVP_AEAD_AES_GCM_SIV_TAG_LEN; const uint8_t *const given_tag = in + plaintext_len; |