@@ -420,7 +420,7 @@ ffi_pass_callback_stdin(rnp_ffi_t ffi,
420420 }
421421
422422 rnp->reuse_password_for_subkey --;
423- if (rnp->reuse_password_for_subkey == 0 ) {
423+ if (rnp->reuse_password_for_subkey == 0 ) {
424424 rnp_buffer_clear (rnp->reused_password , strnlen (rnp->reused_password , buf_len));
425425 free (rnp->reused_password );
426426 rnp->reused_password = NULL ;
@@ -1376,10 +1376,9 @@ cli_rnp_print_key_info(FILE *fp, rnp_ffi_t ffi, rnp_key_handle_t key, bool psecr
13761376 fprintf (fp, " %s" , cli_rnp_normalize_key_alg (alg));
13771377#if defined(ENABLE_PQC)
13781378 // in case of a SPHINCS+ key, also print the parameter set
1379- char *param;
1379+ char * param;
13801380 rnp_result_t res = rnp_key_sphincsplus_get_param (key, ¶m);
1381- if (res == RNP_SUCCESS)
1382- {
1381+ if (res == RNP_SUCCESS) {
13831382 fprintf (fp, " -%s" , param);
13841383 rnp_buffer_destroy (param);
13851384 }
@@ -1546,9 +1545,9 @@ cli_rnp_generate_key(cli_rnp_t *rnp, const char *username)
15461545 rnp_key_handle_t primary = NULL ;
15471546 rnp_key_handle_t subkey = NULL ;
15481547#if defined(ENABLE_PQC)
1549- rnp_key_handle_t subkey2 = NULL ;
1548+ rnp_key_handle_t subkey2 = NULL ;
15501549#endif
1551- bool res = false ;
1550+ bool res = false ;
15521551
15531552 if (rnp_op_generate_create (&genkey, rnp->ffi , cfg.get_cstr (CFG_KG_PRIMARY_ALG))) {
15541553 ERR_MSG (" Failed to initialize key generation." );
@@ -1644,8 +1643,8 @@ cli_rnp_generate_key(cli_rnp_t *rnp, const char *username)
16441643#endif
16451644#if defined(ENABLE_PQC)
16461645 if (cfg.has (CFG_KG_SUBKEY_SPHINCSPLUS_PARAM) &&
1647- rnp_op_generate_set_sphincsplus_param (
1648- genkey, cfg.get_cstr (CFG_KG_SUBKEY_SPHINCSPLUS_PARAM))) {
1646+ rnp_op_generate_set_sphincsplus_param (genkey,
1647+ cfg.get_cstr (CFG_KG_SUBKEY_SPHINCSPLUS_PARAM))) {
16491648 ERR_MSG (" Failed to set sphincsplus parameter." );
16501649 goto done;
16511650 }
@@ -1656,11 +1655,11 @@ cli_rnp_generate_key(cli_rnp_t *rnp, const char *username)
16561655 }
16571656
16581657#if defined(ENABLE_PQC)
1659- if (cfg.has (CFG_KG_SUBKEY_2_ALG)) {
1658+ if (cfg.has (CFG_KG_SUBKEY_2_ALG)) {
16601659 rnp_op_generate_destroy (genkey);
16611660 genkey = NULL ;
16621661 if (rnp_op_generate_subkey_create (
1663- &genkey, rnp->ffi , primary, cfg.get_cstr (CFG_KG_SUBKEY_2_ALG))) {
1662+ &genkey, rnp->ffi , primary, cfg.get_cstr (CFG_KG_SUBKEY_2_ALG))) {
16641663 ERR_MSG (" Failed to initialize subkey 2 generation." );
16651664 goto done;
16661665 }
@@ -1687,14 +1686,14 @@ cli_rnp_generate_key(cli_rnp_t *rnp, const char *username)
16871686 ERR_MSG (" Failed to set hash algorithm." );
16881687 goto done;
16891688 }
1690- #if defined(ENABLE_CRYPTO_REFRESH)
1689+ #if defined(ENABLE_CRYPTO_REFRESH)
16911690 if (cfg.get_bool (CFG_KG_V6_KEY)) {
16921691 rnp_op_generate_set_v6_key (genkey);
16931692 }
1694- #endif
1693+ #endif
16951694 if (cfg.has (CFG_KG_SUBKEY_2_SPHINCSPLUS_PARAM) &&
16961695 rnp_op_generate_set_sphincsplus_param (
1697- genkey, cfg.get_cstr (CFG_KG_SUBKEY_2_SPHINCSPLUS_PARAM))) {
1696+ genkey, cfg.get_cstr (CFG_KG_SUBKEY_2_SPHINCSPLUS_PARAM))) {
16981697 ERR_MSG (" Failed to set sphincsplus parameter." );
16991698 goto done;
17001699 }
@@ -1708,7 +1707,7 @@ cli_rnp_generate_key(cli_rnp_t *rnp, const char *username)
17081707 // protect
17091708#if defined(ENABLE_PQC)
17101709 for (auto key : {primary, subkey, subkey2}) {
1711- if (!key) {
1710+ if (!key) {
17121711 continue ;
17131712 }
17141713#else
@@ -1748,7 +1747,6 @@ cli_rnp_generate_key(cli_rnp_t *rnp, const char *username)
17481747 cli_rnp_print_key_info (stdout, rnp->ffi , subkey2, true , false );
17491748 }
17501749#endif
1751-
17521750 }
17531751 rnp_op_generate_destroy (genkey);
17541752 rnp_key_handle_destroy (primary);
0 commit comments