chiark
/
gitweb
/
~mdw
/
secnet
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
memcmp: Introduce and use consttime_memeq
[secnet]
/
site.c
diff --git
a/site.c
b/site.c
index db65bd80d7ad93d9d22e19d83a7a4b2321fbd088..b9b4d0dd0c0974e3b5d960a077977e14c54d9349 100644
(file)
--- a/
site.c
+++ b/
site.c
@@
-463,7
+463,7
@@
static bool_t check_msg(struct site *st, uint32_t type, struct msg *m,
return False;
}
if (type==LABEL_MSG2) return True;
- if (
memcmp
(m->nR,st->remoteN,NONCELEN)!=0) {
+ if (
!consttime_memeq
(m->nR,st->remoteN,NONCELEN)!=0) {
*error="wrong remotely-generated nonce";
return False;
}