summaryrefslogtreecommitdiffstats
path: root/crypto/modes
diff options
context:
space:
mode:
authorEmilia Kasper <emilia@openssl.org>2015-05-27 17:12:13 +0200
committerEmilia Kasper <emilia@openssl.org>2015-06-08 15:01:14 +0200
commitac32a77cd69784568090e934a31622ddfee49ca7 (patch)
tree395bb6bc89fde1ba17a2e6b686dad06e0e947099 /crypto/modes
parentf877da9cedb95df94105d7292f8e0963175e58dc (diff)
Use CRYPTO_memcmp when comparing authenticators
Pointed out by Victor Vasiliev (vasilvv@mit.edu) via Adam Langley (Google). Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit 1e4a355dcabe2f75df5bb8b41b394d37037169d2)
Diffstat (limited to 'crypto/modes')
-rw-r--r--crypto/modes/gcm128.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/modes/gcm128.c b/crypto/modes/gcm128.c
index 24a84a7ae7..881b2233d7 100644
--- a/crypto/modes/gcm128.c
+++ b/crypto/modes/gcm128.c
@@ -1704,7 +1704,7 @@ int CRYPTO_gcm128_finish(GCM128_CONTEXT *ctx, const unsigned char *tag,
ctx->Xi.u[1] ^= ctx->EK0.u[1];
if (tag && len <= sizeof(ctx->Xi))
- return memcmp(ctx->Xi.c, tag, len);
+ return CRYPTO_memcmp(ctx->Xi.c, tag, len);
else
return -1;
}