devssl: use tsmemcmp() to compare mac to close timing side channel

This commit is contained in:
cinap_lenrek 2016-01-13 21:48:09 +01:00
parent 5243969ba2
commit 21b70c782a

View file

@ -1439,7 +1439,7 @@ checkdigestb(Dstate *s, Block *bin)
*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");
}