summaryrefslogtreecommitdiffstats
path: root/g10/keygen.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2003-04-10 11:56:47 +0200
committerWerner Koch <wk@gnupg.org>2003-04-10 11:56:47 +0200
commit6b5587891221213706b131e262f95072b5ff6a63 (patch)
treef7ad6f0ea7eb77469d8e79cfc79e934087009bcd /g10/keygen.c
parent* main.h, g10.c (main), import.c (parse_import_options, (diff)
downloadgnupg2-6b5587891221213706b131e262f95072b5ff6a63.tar.xz
gnupg2-6b5587891221213706b131e262f95072b5ff6a63.zip
* passphrase.c (read_passphrase_from_fd): Do a dummy read if the
agent is to be used. Noted by Ingo Kl�cker. (agent_get_passphrase): Inhibit caching when we have no fingerprint. This is required for key generation as well as for symmetric only encryption. * passphrase .c (agent_get_passphrase): New arg CANCELED. (passphrase_to_dek): Ditto. Passed to above. Changed all callers to pass NULL. * seckey-cert.c (do_check): New arg CANCELED. (check_secret_key): Terminate loop when canceled. * keyedit.c (change_passphrase): Pass ERRTEXT untranslated to passphrase_to_dek and translate where appropriate. * seckey-cert.c (check_secret_key): Ditto. * keygen.c (ask_passphrase): Ditto. * passphrase.c (agent_get_passphrase): Translate the TRYAGAIN_TEXT. Switch the codeset to utf-8.
Diffstat (limited to 'g10/keygen.c')
-rw-r--r--g10/keygen.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/g10/keygen.c b/g10/keygen.c
index 3e5bc4fcd..ef4b422dd 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -1479,10 +1479,11 @@ ask_passphrase( STRING2KEY **ret_s2k )
for(;;) {
s2k->mode = opt.s2k_mode;
s2k->hash_algo = opt.s2k_digest_algo;
- dek = passphrase_to_dek( NULL, 0, opt.s2k_cipher_algo, s2k,2,errtext);
+ dek = passphrase_to_dek( NULL, 0, opt.s2k_cipher_algo, s2k,2,
+ errtext, NULL);
if( !dek ) {
- errtext = _("passphrase not correctly repeated; try again");
- tty_printf(_("%s.\n"), errtext);
+ errtext = N_("passphrase not correctly repeated; try again");
+ tty_printf(_("%s.\n"), _(errtext));
}
else if( !dek->keylen ) {
m_free(dek); dek = NULL;
@@ -1809,7 +1810,8 @@ proc_parameter_file( struct para_data_s *para, const char *fname,
s2k->mode = opt.s2k_mode;
s2k->hash_algo = opt.s2k_digest_algo;
set_next_passphrase( r->u.value );
- dek = passphrase_to_dek( NULL, 0, opt.s2k_cipher_algo, s2k, 2, NULL );
+ dek = passphrase_to_dek( NULL, 0, opt.s2k_cipher_algo, s2k, 2,
+ NULL, NULL);
set_next_passphrase( NULL );
assert( dek );
memset( r->u.value, 0, strlen(r->u.value) );
@@ -2476,7 +2478,8 @@ generate_subkeypair( KBNODE pub_keyblock, KBNODE sec_keyblock )
s2k->mode = opt.s2k_mode;
s2k->hash_algo = opt.s2k_digest_algo;
set_next_passphrase( passphrase );
- dek = passphrase_to_dek( NULL, 0, opt.s2k_cipher_algo, s2k, 2, NULL );
+ dek = passphrase_to_dek( NULL, 0, opt.s2k_cipher_algo, s2k, 2,
+ NULL, NULL );
}
rc = do_create( algo, nbits, pub_keyblock, sec_keyblock,