mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
agent: Allow signing with card key even without a stub key.
* agent/call-scd.c (agent_card_serialno): Allow NULL for R_SERIAL. (struct readkey_status_parm_s): New. (readkey_status_cb): New. (agent_card_readkey): Add optional arg R_KEYREF and change all callers. * agent/findkey.c (key_parms_from_sexp): Allow also a "public-key". * agent/divert-scd.c (ask_for_card): Allow for SHADOW_INFO being NULL. * agent/pksign.c (agent_pksign_do): Fallback to sign with an on-card if there is no stub key yet. Create the stub key. Also fixed a misnaming between s_pkey and s_skey. -- This change allows to create OpenPGP keys directly from a card without first making sure that a stub key exists. It is also the less surprising behaviour. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
8c63430d1a
commit
638526d37f
8 changed files with 172 additions and 32 deletions
|
@ -1165,6 +1165,8 @@ key_parms_from_sexp (gcry_sexp_t s_key, gcry_sexp_t *r_list,
|
|||
list = gcry_sexp_find_token (s_key, "protected-private-key", 0 );
|
||||
if (!list)
|
||||
list = gcry_sexp_find_token (s_key, "private-key", 0 );
|
||||
if (!list)
|
||||
list = gcry_sexp_find_token (s_key, "public-key", 0 );
|
||||
if (!list)
|
||||
{
|
||||
log_error ("invalid private key format\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue