Rework of some parts to support several keys pers slot.
authorWerner Koch <wk@gnupg.org>
Thu, 14 Feb 2019 19:57:57 +0000 (20:57 +0100)
committerWerner Koch <wk@gnupg.org>
Thu, 14 Feb 2019 19:57:57 +0000 (20:57 +0100)
commitff9e757e352f1b4cf3b4625eb4398415051367af
tree59d45cea9d4fe83479c1c073e9a42a6ff5bbd3ce
parentc4be31f93ea5f471f7ca127ed61b02fc14c418d6
Rework of some parts to support several keys pers slot.

* src/cert.h (struct cert): Add member certref.
* src/agent.h (struct agent_card_info_s): Remove legacy data.
* src/agent.c (learn_status_cb): Ditto.
(scute_agent_get_cert): Copy the certref to the cert object.
* src/cert-object.c (scute_attr_cert): Add arg 'grip' and use new
scheme for CKA_ID.
(scute_attr_prv): Ditto.
* src/gpgsm.c (struct search): Rename to search_cb_parm for clarity.
Add member 'grip'.
(search_cb): Pass GRIP to scute_attr_prv and scute_attr_cert.
(scute_gpgsm_get_cert): Convey GRIP.
* src/slots.c (slot_init): Replace fixed "OPENPGP.3" by a loop over
all available keyrefs.
(session_sign): Actually use the set key.  Add a few checks.

* src/settings.h (LIBRARY_DESCRIPTION): Rename to "GnuPG".

* src/slots.c (mechanism_alloc): Change ulMaxKeySize to 4096.

* src/p11-gettokeninfo.c (C_GetTokenInfo): Set ulMaxSessionCount to
CK_EFFECTIVELY_INFINITE.

* tests/t-getattribute.c (dump_one_string): New.
(dump_object): Use for some objects.

Signed-off-by: Werner Koch <wk@gnupg.org>
14 files changed:
configure.ac
src/agent.c
src/agent.h
src/cert-object.c
src/cert.h
src/gpgsm.c
src/p11-gettokeninfo.c
src/p11-sign.c
src/p11-signinit.c
src/settings.h
src/slots.c
tests/t-auth.c
tests/t-getattribute.c
tests/t-getinfo.c