mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Check correct returned value
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user