mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
agent: Make --disable-extended-key-format a dummy option.
* agent/agent.h (opt): Remove enable_extended_key_format.
* agent/gpg-agent.c (enum cmd_and_opt_values): Turn
oDisableExtendedKeyFormat and oEnableExtendedKeyFormat into dummy
options.
* agent/protect.c (do_encryption): Remove arg use_ocb and
corresponding code.
(agent_protect): Ditto. Change all callers.
* agent/command.c (cmd_readkey): Do not test for key availability here
but defer that agent_write_shadow_key.
* agent/findkey.c (agent_write_private_key): Simplify due to the
removal of disable-extended-key-format.
(write_extended_private_key): Fold into agent_write_private_key.
Remove the maybe_update arg.
(agent_write_shadow_key): Ditto. Simplify.
--
GnuPG-bug-id: 6386
Backported-from-master: 6d792ae2eb
But with large changes to get 2.2 more aligned with master again. This
is not finished; in particular the bug is not fixed; this comes wit
the next patch.
This commit is contained in:
parent
db73f17f0c
commit
4f754caad8
12 changed files with 227 additions and 449 deletions
|
@ -132,13 +132,6 @@ struct
|
|||
passphrase change. */
|
||||
int enable_passphrase_history;
|
||||
|
||||
/* If set the extended key format is used for new keys. Note that
|
||||
* this may have the value 2 in which case
|
||||
* --disable-extended-key-format won't have any effect and thus
|
||||
* effectivley locking it. This is required to support existing
|
||||
* profiles which lock the use of --enable-extended-key-format. */
|
||||
int enable_extended_key_format;
|
||||
|
||||
int running_detached; /* We are running detached from the tty. */
|
||||
|
||||
/* If this global option is true, the passphrase cache is ignored
|
||||
|
@ -430,9 +423,8 @@ gpg_error_t agent_modify_description (const char *in, const char *comment,
|
|||
const gcry_sexp_t key, char **result);
|
||||
int agent_write_private_key (const unsigned char *grip,
|
||||
const void *buffer, size_t length, int force,
|
||||
time_t timestamp,
|
||||
const char *serialno, const char *keyref,
|
||||
const char *dispserialno);
|
||||
const char *dispserialno, time_t timestamp);
|
||||
gpg_error_t agent_key_from_file (ctrl_t ctrl,
|
||||
const char *cache_nonce,
|
||||
const char *desc_text,
|
||||
|
@ -533,7 +525,7 @@ unsigned char get_standard_s2k_count_rfc4880 (void);
|
|||
unsigned long get_standard_s2k_time (void);
|
||||
int agent_protect (const unsigned char *plainkey, const char *passphrase,
|
||||
unsigned char **result, size_t *resultlen,
|
||||
unsigned long s2k_count, int use_ocb);
|
||||
unsigned long s2k_count);
|
||||
gpg_error_t agent_unprotect (ctrl_t ctrl,
|
||||
const unsigned char *protectedkey, const char *passphrase,
|
||||
gnupg_isotime_t protected_at,
|
||||
|
@ -552,8 +544,7 @@ gpg_error_t s2k_hash_passphrase (const char *passphrase, int hashalgo,
|
|||
const unsigned char *s2ksalt,
|
||||
unsigned int s2kcount,
|
||||
unsigned char *key, size_t keylen);
|
||||
gpg_error_t agent_write_shadow_key (int maybe_update,
|
||||
const unsigned char *grip,
|
||||
gpg_error_t agent_write_shadow_key (const unsigned char *grip,
|
||||
const char *serialno, const char *keyid,
|
||||
const unsigned char *pkbuf, int force,
|
||||
const char *dispserialno);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue