diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index d9e653a30..7cf78c58d 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -11579,9 +11579,12 @@ static int rsa_decode_test(RsaKey* keyPub) ret = -7473; goto done; } - /* TODO: probably should fail when length is -1! */ ret = wc_RsaPublicKeyDecodeRaw(n, (word32)-1, e, sizeof(e), keyPub); +#ifndef WOLFSSL_SP_MATH if (ret != 0) { +#else + if (ret != ASN_GETINT_E) { +#endif ret = -7474; goto done; } @@ -11590,7 +11593,11 @@ static int rsa_decode_test(RsaKey* keyPub) if (ret != 0) return -7475; ret = wc_RsaPublicKeyDecodeRaw(n, sizeof(n), e, (word32)-1, keyPub); +#ifndef WOLFSSL_SP_MATH if (ret != 0) { +#else + if (ret != ASN_GETINT_E) { +#endif ret = -7476; goto done; }