devtls: fix hmac buffer size for SHA1 hashes (from erik)

the buffer isn't big enough for SHA1 hashes, which are larger than MD5
hashes.
This commit is contained in:
cinap_lenrek 2013-01-09 06:39:20 +01:00
parent 2de4e31f56
commit 77438f99c8

View file

@ -732,7 +732,7 @@ tlsrecread(TlsRec *tr)
{
OneWay *volatile in;
Block *volatile b;
uchar *p, seq[8], header[RecHdrLen], hmac[MD5dlen];
uchar *p, seq[8], header[RecHdrLen], hmac[MaxMacLen];
int volatile nconsumed;
int len, type, ver, unpad_len;
@ -1323,7 +1323,7 @@ tlsbwrite(Chan *c, Block *b, ulong offset)
tr = tlsdevs[CONV(c->qid)];
if(tr == nil)
panic("tlsbread");
panic("tlsbwrite");
ty = TYPE(c->qid);
switch(ty) {