diff options
Diffstat (limited to 'src/lib/libcrypto/evp/e_chacha20poly1305.c')
-rw-r--r-- | src/lib/libcrypto/evp/e_chacha20poly1305.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/evp/e_chacha20poly1305.c b/src/lib/libcrypto/evp/e_chacha20poly1305.c index da1e036668..c003b0ba7f 100644 --- a/src/lib/libcrypto/evp/e_chacha20poly1305.c +++ b/src/lib/libcrypto/evp/e_chacha20poly1305.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: e_chacha20poly1305.c,v 1.8 2014/07/10 22:45:57 jsing Exp $ */ | 1 | /* $OpenBSD: e_chacha20poly1305.c,v 1.9 2015/06/20 12:01:14 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014, Google Inc. | 3 | * Copyright (c) 2014, Google Inc. |
4 | * | 4 | * |
@@ -200,7 +200,7 @@ aead_chacha20_poly1305_open(const EVP_AEAD_CTX *ctx, unsigned char *out, | |||
200 | poly1305_update_with_length(&poly1305, in, plaintext_len); | 200 | poly1305_update_with_length(&poly1305, in, plaintext_len); |
201 | CRYPTO_poly1305_finish(&poly1305, mac); | 201 | CRYPTO_poly1305_finish(&poly1305, mac); |
202 | 202 | ||
203 | if (CRYPTO_memcmp(mac, in + plaintext_len, c20_ctx->tag_len) != 0) { | 203 | if (timingsafe_memcmp(mac, in + plaintext_len, c20_ctx->tag_len) != 0) { |
204 | EVPerr(EVP_F_AEAD_CHACHA20_POLY1305_OPEN, EVP_R_BAD_DECRYPT); | 204 | EVPerr(EVP_F_AEAD_CHACHA20_POLY1305_OPEN, EVP_R_BAD_DECRYPT); |
205 | return 0; | 205 | return 0; |
206 | } | 206 | } |