Its ok with smaller signatures.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19148 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -145,7 +145,7 @@ imath_rsa_public_decrypt(int flen, const unsigned char* from,
|
||||
if (padding != RSA_PKCS1_PADDING)
|
||||
return -1;
|
||||
|
||||
if (flen != RSA_size(rsa))
|
||||
if (flen > RSA_size(rsa))
|
||||
return -1;
|
||||
|
||||
BN2mpz(&n, rsa->n);
|
||||
@@ -270,7 +270,7 @@ imath_rsa_private_decrypt(int flen, const unsigned char* from,
|
||||
return -1;
|
||||
|
||||
size = RSA_size(rsa);
|
||||
if (flen != size)
|
||||
if (flen > size)
|
||||
return -2;
|
||||
|
||||
mp_int_init(&enc);
|
||||
|
Reference in New Issue
Block a user