~mdw
/
tripe
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
server: Compare MAC tags in constant time.
[tripe]
/
server
/
chal.c
diff --git
a/server/chal.c
b/server/chal.c
index
12b64e2
..
e282f08
100644
(file)
--- a/
server/chal.c
+++ b/
server/chal.c
@@
-117,7
+117,7
@@
int c_check(buf *b)
}
h = GM_INIT(mac);
GH_HASH(h, p, 4);
- ok =
(memcmp(GH_DONE(h, 0), p + 4, master->algs.tagsz) == 0
);
+ ok =
ct_memeq(GH_DONE(h, 0), p + 4, master->algs.tagsz
);
GH_DESTROY(h);
if (!ok) {
a_warn("CHAL", "incorrect-tag", A_END);