Fixes issue with uninitialized `caKey` found with valgrind reported in ZD 13212.
parent
7931f0dff5
commit
7212062235
|
@ -163,10 +163,13 @@ static int do_csrsign(int argc, char** argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Loading CA key to ecc_key struct\n");
|
printf("Loading CA key to ecc_key struct\n");
|
||||||
|
ret = wc_ecc_init(&caKey);
|
||||||
|
if (ret != 0) goto exit;
|
||||||
|
initCaKey = 1;
|
||||||
|
|
||||||
idx = 0;
|
idx = 0;
|
||||||
ret = wc_EccPrivateKeyDecode(derBuf, &idx, &caKey, derSz);
|
ret = wc_EccPrivateKeyDecode(derBuf, &idx, &caKey, derSz);
|
||||||
if (ret != 0) goto exit;
|
if (ret != 0) goto exit;
|
||||||
initCaKey = 1;
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
/* Load CSR PEM */
|
/* Load CSR PEM */
|
||||||
|
|
Loading…
Reference in New Issue