diff options
author | David Shaw <[email protected]> | 2002-11-06 16:58:28 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2002-11-06 16:58:28 +0000 |
commit | 3cb4118b6c9c55d874d7dd463600d792f1fdd266 (patch) | |
tree | e5ce983b4d2a340792aab3f87433f237f950310e /g10/passphrase.c | |
parent | * gpgkeys_ldap.c (key_in_keylist, add_key_to_keylist, free_keylist, (diff) | |
download | gnupg-3cb4118b6c9c55d874d7dd463600d792f1fdd266.tar.gz gnupg-3cb4118b6c9c55d874d7dd463600d792f1fdd266.zip |
* pubkey-enc.c (get_session_key): With hidden recipients or try a given
passphrase against all secret keys rather than trying all secret keys in
turn. Don't if --try-all-secrets or --status-fd is enabled.
* passphrase.c (passphrase_to_dek): Mode 1 means do a regular passphrase
query, but don't prompt with the key info.
* seckey-cert.c (do_check, check_secret_key): A negative ask count means
to enable passphrase mode 1.
* keydb.h, getkey.c (enum_secret_keys): Add flag to include
secret-parts-missing keys (or not) in the list.
Diffstat (limited to 'g10/passphrase.c')
-rw-r--r-- | g10/passphrase.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/g10/passphrase.c b/g10/passphrase.c index d84d6e88b..3744c5b37 100644 --- a/g10/passphrase.c +++ b/g10/passphrase.c @@ -935,7 +935,8 @@ passphrase_clear_cache ( u32 *keyid, int algo ) /**************** * Get a passphrase for the secret key with KEYID, display TEXT * if the user needs to enter the passphrase. - * mode 0 = standard, 2 = create new passphrase + * mode 0 = standard, 1 = same but don't show key info, + * 2 = create new passphrase * Returns: a DEK with a session key; caller must free * or NULL if the passphrase was not correctly repeated. * (only for mode 2) @@ -996,7 +997,7 @@ passphrase_to_dek( u32 *keyid, int pubkey_algo, } } - if( keyid && !opt.batch && !next_pw ) { + if( keyid && !opt.batch && !next_pw && mode!=1 ) { PKT_public_key *pk = m_alloc_clear( sizeof *pk ); size_t n; char *p; |