chiark / gitweb /
rsa.c: Check public key length.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 25 Jul 2013 17:30:46 +0000 (18:30 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 25 Jul 2013 17:30:46 +0000 (18:30 +0100)
commitf15aefe4e0bb264fc1ceac17c7bbe1a534d190c9
treeb6d7cbe0b1ce022877f124ef3de37c75a9298362
parent9941ae2e1f8bd7cb5771527b41d6a2032cd6580f
rsa.c: Check public key length.

The private key is checked quite carefully -- even to a fault -- for
being sensibly sized, but the corresponding function for public keys
appears to have no checking at all.  This is a shame since message-
representative construction assumes that the message representative will
fit in a fixed-size buffer.

Fix this situation by checking public key sizes in `rsapub_apply'.

Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
rsa.c