1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

agent: Add optional ecdh parameter arg to KEYTOCARD.

* agent/command.c (KEYTOCARD_TIMESTAMP_FORMAT): Remove and use format
string direct.
(cmd_keytocard): Change timestamp to an u64 and use the new u64 parser
functions.  Use split_fields.  Add ecdh parameter stuff.  Take the
default timestamp from the keyfile.
* agent/findkey.c (agent_key_from_file): Add arg timestamp and set it.
Adjust all callers.
--

This is backport from 2.4 but only the agent part.  We consider it
more relibale if we also pass the ECDH parameters along in 2.2.
Adding the timestamp stuff should not harm either.  Because we now
have the u64 time string parser, we use them here.

See-commit: c03ba92576
See-commit: c795be79c1
This patch is somewhat related to:
GnuPG-bug-id: 6378, 5538
This commit is contained in:
Werner Koch 2023-10-27 12:19:50 +02:00
parent 5da8fe1c40
commit d03d0add12
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
5 changed files with 133 additions and 77 deletions

View file

@ -433,7 +433,8 @@ gpg_error_t agent_key_from_file (ctrl_t ctrl,
cache_mode_t cache_mode,
lookup_ttl_t lookup_ttl,
gcry_sexp_t *result,
char **r_passphrase);
char **r_passphrase,
uint64_t *r_timestamp);
gpg_error_t agent_raw_key_from_file (ctrl_t ctrl, const unsigned char *grip,
gcry_sexp_t *result);
gpg_error_t agent_keymeta_from_file (ctrl_t ctrl, const unsigned char *grip,