chiark
/
gitweb
/
~mdw
/
tripe
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
server/: New `implicit-IV' transform (`iiv').
[tripe]
/
server
/
chal.c
diff --git
a/server/chal.c
b/server/chal.c
index 12b64e21ab4a7676c8a6182c794be8560ebdc864..387f0db1fb29e182d36b28d9df979d7ebce21082 100644
(file)
--- a/
server/chal.c
+++ b/
server/chal.c
@@
-117,14
+117,14
@@
int c_check(buf *b)
}
h = GM_INIT(mac);
GH_HASH(h, p, 4);
}
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);
goto fail;
}
seq = LOAD32(p);
GH_DESTROY(h);
if (!ok) {
a_warn("CHAL", "incorrect-tag", A_END);
goto fail;
}
seq = LOAD32(p);
- if (seq_check(&iseq,
LOAD32(p)
, "CHAL"))
+ if (seq_check(&iseq,
seq
, "CHAL"))
goto fail;
T( trace(T_CHAL, "chal: checked challenge %lu", (unsigned long)seq); )
return (0);
goto fail;
T( trace(T_CHAL, "chal: checked challenge %lu", (unsigned long)seq); )
return (0);