forked from wolfSSL/wolfssl
Check correct returned value
This commit is contained in:
@ -11579,9 +11579,12 @@ static int rsa_decode_test(RsaKey* keyPub)
|
|||||||
ret = -7473;
|
ret = -7473;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
/* TODO: probably should fail when length is -1! */
|
|
||||||
ret = wc_RsaPublicKeyDecodeRaw(n, (word32)-1, e, sizeof(e), keyPub);
|
ret = wc_RsaPublicKeyDecodeRaw(n, (word32)-1, e, sizeof(e), keyPub);
|
||||||
|
#ifndef WOLFSSL_SP_MATH
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
#else
|
||||||
|
if (ret != ASN_GETINT_E) {
|
||||||
|
#endif
|
||||||
ret = -7474;
|
ret = -7474;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@ -11590,7 +11593,11 @@ static int rsa_decode_test(RsaKey* keyPub)
|
|||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
return -7475;
|
return -7475;
|
||||||
ret = wc_RsaPublicKeyDecodeRaw(n, sizeof(n), e, (word32)-1, keyPub);
|
ret = wc_RsaPublicKeyDecodeRaw(n, sizeof(n), e, (word32)-1, keyPub);
|
||||||
|
#ifndef WOLFSSL_SP_MATH
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
#else
|
||||||
|
if (ret != ASN_GETINT_E) {
|
||||||
|
#endif
|
||||||
ret = -7476;
|
ret = -7476;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user