diff --git a/lib/des/rsa-imath.c b/lib/des/rsa-imath.c index 51635e513..d4f3c3eb5 100644 --- a/lib/des/rsa-imath.c +++ b/lib/des/rsa-imath.c @@ -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);