diff options
Diffstat (limited to 'g10/keygen.c')
-rw-r--r-- | g10/keygen.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/g10/keygen.c b/g10/keygen.c index 47a24b2ae..1d1cdbfc2 100644 --- a/g10/keygen.c +++ b/g10/keygen.c @@ -687,9 +687,9 @@ ask_passphrase( STRING2KEY **ret_s2k ) s2k = m_alloc_secure( sizeof *s2k ); for(;;) { - s2k->mode = 1; - s2k->hash_algo = DIGEST_ALGO_RMD160; - dek = passphrase_to_dek( NULL, CIPHER_ALGO_BLOWFISH, s2k, 2 ); + s2k->mode = opt.s2k_mode; + s2k->hash_algo = opt.s2k_digest_algo; + dek = passphrase_to_dek( NULL, opt.s2k_cipher_algo, s2k, 2 ); if( !dek ) { tty_printf(_("passphrase not correctly repeated; try again.\n")); } @@ -970,10 +970,10 @@ generate_subkeypair( KBNODE pub_keyblock, KBNODE sec_keyblock ) if( passphrase ) { s2k = m_alloc_secure( sizeof *s2k ); - s2k->mode = 1; - s2k->hash_algo = DIGEST_ALGO_RMD160; + s2k->mode = opt.s2k_mode; + s2k->hash_algo = opt.s2k_digest_algo; set_next_passphrase( passphrase ); - dek = passphrase_to_dek( NULL, CIPHER_ALGO_BLOWFISH, s2k, 2 ); + dek = passphrase_to_dek( NULL, opt.s2k_cipher_algo, s2k, 2 ); } rc = do_create( algo, nbits, pub_keyblock, sec_keyblock, |