1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

fixed a bug in the prompt formatter.

This commit is contained in:
Werner Koch 2008-10-28 11:41:52 +00:00
parent 77452f25f0
commit 3f8e827f63
32 changed files with 129 additions and 85 deletions

View file

@ -1151,7 +1151,15 @@ change_passphrase( KBNODE keyblock )
no_primary_secrets = 1;
}
else {
u32 keyid[2];
tty_printf(_("Key is protected.\n"));
/* Clear the passphrase cache so that the user is required
to enter the old passphrase. */
keyid_from_sk (sk, keyid);
passphrase_clear_cache (keyid, NULL, 0);
rc = check_secret_key( sk, 0 );
if( !rc )
passphrase = get_last_passphrase();
@ -1233,7 +1241,17 @@ change_passphrase( KBNODE keyblock )
log_error("protect_secret_key failed: %s\n",
g10_errstr(rc) );
else
{
u32 keyid[2];
/* Clear the cahce again so that the user is
required to enter the new passphrase at the
next operation. */
keyid_from_sk (sk, keyid);
passphrase_clear_cache (keyid, NULL, 0);
changed++;
}
break;
}
}