isoApplet: Prevent reading uninitialized values
CID 365823 Thanks coverity
This commit is contained in:
parent
2f232f217b
commit
1dbe4b5a5b
@ -358,6 +358,8 @@ isoApplet_generate_key_rsa(sc_pkcs15_prkey_info_t *key_info, sc_card_t *card,
|
|||||||
|
|
||||||
LOG_FUNC_CALLED(card->ctx);
|
LOG_FUNC_CALLED(card->ctx);
|
||||||
|
|
||||||
|
memset(&args, 0, sizeof(args));
|
||||||
|
|
||||||
/* Check key size: */
|
/* Check key size: */
|
||||||
keybits = key_info->modulus_length;
|
keybits = key_info->modulus_length;
|
||||||
if (keybits != 2048)
|
if (keybits != 2048)
|
||||||
@ -370,7 +372,6 @@ isoApplet_generate_key_rsa(sc_pkcs15_prkey_info_t *key_info, sc_card_t *card,
|
|||||||
/* Generate the key.
|
/* Generate the key.
|
||||||
* Note: key size is not explicitly passed to the card.
|
* Note: key size is not explicitly passed to the card.
|
||||||
* It assumes 2048 along with the algorithm reference. */
|
* It assumes 2048 along with the algorithm reference. */
|
||||||
memset(&args, 0, sizeof(args));
|
|
||||||
args.algorithm_ref = SC_ISOAPPLET_ALG_REF_RSA_GEN_2048;
|
args.algorithm_ref = SC_ISOAPPLET_ALG_REF_RSA_GEN_2048;
|
||||||
args.priv_key_ref = key_info->key_reference;
|
args.priv_key_ref = key_info->key_reference;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user