forked from wolfSSL/wolfssl
break out of loop on failure instead of return
This commit is contained in:
@ -26018,9 +26018,8 @@ int wc_RsaKeyToDer(RsaKey* key, byte* output, word32 inLen)
|
|||||||
#else
|
#else
|
||||||
keyInt = GetRsaInt(key, i);
|
keyInt = GetRsaInt(key, i);
|
||||||
ret = mp_unsigned_bin_size(keyInt);
|
ret = mp_unsigned_bin_size(keyInt);
|
||||||
if (ret < 0) {
|
if (ret < 0)
|
||||||
return ret;
|
break;
|
||||||
}
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
/* This won't overrun output due to the outLen check above */
|
/* This won't overrun output due to the outLen check above */
|
||||||
mpSz = SetASNIntMP(keyInt, MAX_RSA_INT_SZ, output + j);
|
mpSz = SetASNIntMP(keyInt, MAX_RSA_INT_SZ, output + j);
|
||||||
|
Reference in New Issue
Block a user