forked from wolfSSL/wolfssl
move variable declaration to beginning of block
This commit is contained in:
@ -4914,11 +4914,13 @@ int wc_RsaKeyToDer(RsaKey* key, byte* output, word32 inLen)
|
|||||||
sizes[i] = SetLength(rawLen, tmps[i] + 1) + 1 + lbit; /* tag & lbit */
|
sizes[i] = SetLength(rawLen, tmps[i] + 1) + 1 + lbit; /* tag & lbit */
|
||||||
|
|
||||||
if (sizes[i] <= MAX_SEQ_SZ) {
|
if (sizes[i] <= MAX_SEQ_SZ) {
|
||||||
|
int err;
|
||||||
|
|
||||||
/* leading zero */
|
/* leading zero */
|
||||||
if (lbit)
|
if (lbit)
|
||||||
tmps[i][sizes[i]-1] = 0x00;
|
tmps[i][sizes[i]-1] = 0x00;
|
||||||
|
|
||||||
int err = mp_to_unsigned_bin(keyInt, tmps[i] + sizes[i]);
|
err = mp_to_unsigned_bin(keyInt, tmps[i] + sizes[i]);
|
||||||
if (err == MP_OKAY) {
|
if (err == MP_OKAY) {
|
||||||
sizes[i] += (rawLen-lbit); /* lbit included in rawLen */
|
sizes[i] += (rawLen-lbit); /* lbit included in rawLen */
|
||||||
intTotalLen += sizes[i];
|
intTotalLen += sizes[i];
|
||||||
|
Reference in New Issue
Block a user