diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-04-04 01:59:17 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2017-04-04 01:59:17 +0200 |
commit | de80075fc6bdc6dc785a67db2deaa59df020cfa6 (patch) | |
tree | 5eeca59550ae68b1866ec3527d9473071ad5bd95 /sys/src/cmd/python/Python/mactoolboxglue.c | |
parent | 02ffb19904f03cad21dd10a774705b9152d89010 (diff) |
tlshand: fix mpint to bytes conversion, reorganize send/recv buffer, check for overflow in msgSend()
when converting mpint to bytes, always pad it to the size of
the modulus (RSA,DHE,ECDHE). mptobytes() now takes a byte len
parameter which the caller usually calculates from the group
modulus using mpsignif(). this bug sometimes caused "bad record mac"
after the handshake.
use a shared buffer, given that msgSend()/msgRecv() don't overlap
we can use the first half for sending, and the top half for
receiving, shifting down as neccesary. the space beween sendp and
recvp is free.
explicitely check for overflow in msgSend().
Diffstat (limited to 'sys/src/cmd/python/Python/mactoolboxglue.c')
0 files changed, 0 insertions, 0 deletions