mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
*** empty log message ***
This commit is contained in:
parent
1b368847f5
commit
48da5f940b
34 changed files with 650 additions and 377 deletions
|
@ -154,15 +154,18 @@ do_check( PKT_secret_key *sk )
|
|||
|
||||
/****************
|
||||
* Check the secret key
|
||||
* Ask up to 3 times for a correct passphrase
|
||||
* Ask up to 3 (or n) times for a correct passphrase
|
||||
*/
|
||||
int
|
||||
check_secret_key( PKT_secret_key *sk )
|
||||
check_secret_key( PKT_secret_key *sk, int n )
|
||||
{
|
||||
int rc = G10ERR_BAD_PASS;
|
||||
int i;
|
||||
|
||||
for(i=0; i < 3 && rc == G10ERR_BAD_PASS; i++ ) {
|
||||
if( n < 1 )
|
||||
n = 3; /* use the default value */
|
||||
|
||||
for(i=0; i < n && rc == G10ERR_BAD_PASS; i++ ) {
|
||||
if( i )
|
||||
log_error(_("Invalid passphrase; please try again ...\n"));
|
||||
rc = do_check( sk );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue