Return -1 for failure.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19149 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-11-27 11:24:33 +00:00
parent 96df083d5d
commit 28229b426f

View File

@@ -271,7 +271,7 @@ imath_rsa_private_decrypt(int flen, const unsigned char* from,
size = RSA_size(rsa);
if (flen > size)
return -2;
return -1;
mp_int_init(&enc);
mp_int_init(&dec);
@@ -303,13 +303,13 @@ imath_rsa_private_decrypt(int flen, const unsigned char* from,
/* head zero was skipped by mp_int_to_unsigned */
if (*p != 2)
return -3;
return -1;
size--; p++;
while (size && *p != 0) {
size--; p++;
}
if (size == 0)
return -4;
return -1;
size--; p++;
memmove(to, p, size);