From ef080d5c7fb7f3b75c3c57c011f78a312b8e13a9 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Sat, 25 Jul 2015 12:09:23 +0900 Subject: scd: support any curves defined by libgcrypt. * g10/call-agent.h (struct agent_card_info_s): Add curve field. * g10/call-agent.c (learn_status_cb): Use curve name. * g10/card-util.c (card_status): Show pubkey name. * scd/app-openpgp.c (struct app_local_s): Record OID and flags. (store_fpr): Use ALGO instead of key type. (send_key_attr): Use curve name instead of OID. (get_public_key): Clean up by OID to curve name. (ecc_writekey): Support any curves in libgcrypt. (do_genkey, do_auth, ): Follow the change. (ecc_oid): New. (parse_algorithm_attribute): Show OID here. --- g10/call-agent.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'g10/call-agent.h') diff --git a/g10/call-agent.h b/g10/call-agent.h index df570a44b..70421dba4 100644 --- a/g10/call-agent.h +++ b/g10/call-agent.h @@ -55,7 +55,10 @@ struct agent_card_info_s int chvretry[3]; /* Allowed retries for the CHV; 0 = blocked. */ struct { /* Array with key attributes. */ int algo; /* Algorithm identifier. */ - unsigned int nbits; /* Supported keysize. */ + union { + unsigned int nbits; /* Supported keysize. */ + const char *curve; /* Name of curve. */ + }; } key_attr[3]; struct { unsigned int ki:1; /* Key import available. */ -- cgit v1.2.3