Paul Bakker db1f05985e Add a check for buffer overflow to pkcs11_sign()
pkcs11_sign() reuses *sig to store the header and hash, but those might
be larger than the actual sig, causing a buffer overflow.

An overflow can occur when using raw sigs with hashlen > siglen, or when
the RSA key is less than 664 bits long (or less when using hashes
shorter than SHA512)

As siglen is always within the 'low realm' < 32k, an overflow of asnlen
+ hashlen is not possible.
2014-03-26 15:14:21 +01:00
..
2014-03-13 19:25:06 +01:00
2014-03-21 12:03:07 +01:00
2014-03-26 12:58:46 +01:00
2014-03-13 19:25:06 +01:00
2014-03-21 12:03:07 +01:00
2014-01-22 14:17:31 +01:00
2014-03-21 12:03:03 +01:00
2014-03-26 12:58:49 +01:00
2014-03-14 08:41:01 +01:00
2014-03-14 08:41:00 +01:00
2010-07-18 20:36:00 +00:00
2014-03-13 19:25:06 +01:00
2013-10-28 21:19:10 +01:00
2013-10-28 21:19:10 +01:00