ref: 21b70c782a6c62abf959564534d83147065981d6
parent: 5243969ba23281e6d4320b55cae666321c17d2a2
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Wed Jan 13 16:48:09 EST 2016
devssl: use tsmemcmp() to compare mac to close timing side channel
--- a/sys/src/9/port/devssl.c
+++ b/sys/src/9/port/devssl.c
@@ -1439,7 +1439,7 @@
*p = n;
(*s->hf)(msgid, 4, digest, &ss);
- if(memcmp(digest, bin->rp, s->diglen) != 0)
+ if(tsmemcmp(digest, bin->rp, s->diglen) != 0)
error("bad digest");
}