diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-01-09 06:39:20 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-01-09 06:39:20 +0100 |
commit | 77438f99c83b3d3965a5672cbe6618f65c30b9b4 (patch) | |
tree | b81d90bcddd9cab3f157014d9446e8dcecd1b496 | |
parent | 2de4e31f562fbb5c6d1f37cc9595b40cc7b37345 (diff) |
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.
-rw-r--r-- | sys/src/9/port/devtls.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/9/port/devtls.c b/sys/src/9/port/devtls.c index f853abcee..3e98eaf02 100644 --- a/sys/src/9/port/devtls.c +++ b/sys/src/9/port/devtls.c @@ -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) { |