summaryrefslogtreecommitdiffstats
path: root/g10/keydb.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2021-05-17 19:27:54 +0200
committerWerner Koch <wk@gnupg.org>2021-05-17 19:48:15 +0200
commit6dfae2f402a702ccd7f2c585b28cb356e9f26a26 (patch)
tree199d5a9ebc0f1afdeb94a8e8e0096985b41d9770 /g10/keydb.h
parentdirmngr: LDAP search by a mailbox now ignores revoked keys. (diff)
downloadgnupg2-6dfae2f402a702ccd7f2c585b28cb356e9f26a26.tar.xz
gnupg2-6dfae2f402a702ccd7f2c585b28cb356e9f26a26.zip
gpg: Use a more descriptive prompt for symmetric decryption.
* g10/keydb.h (GETPASSWORD_FLAG_SYMDECRYPT): New. (passphrase_to_dek_ext): Remove this obsolete prototype. * g10/passphrase.c (passphrase_get): Add arg flags. Use new flag value. (passphrase_to_dek): Add arg flags and pass it on. * g10/mainproc.c (proc_symkey_enc): Use new flag. * sm/decrypt.c (pwri_decrypt): Use "passphrase". -- Signed-off-by: Werner Koch <wk@gnupg.org> (cherry picked from commit 03f83bcda5d1f8d8246bcc1afc603b7f74d0626b) Note that we keep on using the term "passphrase" although "password" would be better. There are however so many occurance of this and given it is a bike shedding topic we fix that in the PO files. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/keydb.h')
-rw-r--r--g10/keydb.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/g10/keydb.h b/g10/keydb.h
index 4703294f4..806b9303b 100644
--- a/g10/keydb.h
+++ b/g10/keydb.h
@@ -292,19 +292,19 @@ gpg_error_t build_sk_list (ctrl_t ctrl, strlist_t locusr,
SK_LIST *ret_sk_list, unsigned use);
/*-- passphrase.h --*/
+
+/* Flags for passphrase_to_dek */
+#define GETPASSWORD_FLAG_SYMDECRYPT 1
+
int have_static_passphrase(void);
const char *get_static_passphrase (void);
void set_passphrase_from_string(const char *pass);
void read_passphrase_from_fd( int fd );
void passphrase_clear_cache (const char *cacheid);
-DEK *passphrase_to_dek_ext(u32 *keyid, int pubkey_algo,
- int cipher_algo, STRING2KEY *s2k, int mode,
- const char *tryagain_text,
- const char *custdesc, const char *custprompt,
- int *canceled);
DEK *passphrase_to_dek (int cipher_algo, STRING2KEY *s2k,
int create, int nocache,
- const char *tryagain_text, int *canceled);
+ const char *tryagain_text, unsigned int flags,
+ int *canceled);
void set_next_passphrase( const char *s );
char *get_last_passphrase(void);
void next_to_last_passphrase(void);