summaryrefslogtreecommitdiff
path: root/sys/crypto
diff options
context:
space:
mode:
authorMatthew Dempsky <matthew@cvs.openbsd.org>2010-07-20 15:36:04 +0000
committerMatthew Dempsky <matthew@cvs.openbsd.org>2010-07-20 15:36:04 +0000
commitf95bf0159b9d317656e04f36a7b45f5984a04918 (patch)
treead30ebd92f81eada1f3fafedd81cc6fbf3209fa4 /sys/crypto
parentc423123010a4d3b4ee7bbd318a9d01bad08b80a2 (diff)
Switch some obvious network stack MAC comparisons from bcmp() to
timingsafe_bcmp(). ok deraadt@; committed over WPA.
Diffstat (limited to 'sys/crypto')
-rw-r--r--sys/crypto/key_wrap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/crypto/key_wrap.c b/sys/crypto/key_wrap.c
index e99e74b9df2..b9009ad54b3 100644
--- a/sys/crypto/key_wrap.c
+++ b/sys/crypto/key_wrap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key_wrap.c,v 1.1 2008/08/12 15:43:00 damien Exp $ */
+/* $OpenBSD: key_wrap.c,v 1.2 2010/07/20 15:36:03 matthew Exp $ */
/*-
* Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr>
@@ -108,5 +108,5 @@ aes_key_unwrap(aes_key_wrap_ctx *ctx, const u_int8_t *C, u_int8_t *P, size_t n)
memset(B, 0, sizeof B);
/* check that A is an appropriate initial value */
- return memcmp(A, IV, 8) != 0;
+ return timingsafe_bcmp(A, IV, 8) != 0;
}