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

scd: Change the apptype from a string to an enum.

* scd/app-common.h (cardtype_t): New.
(apptype_t): New.
(struct app_ctx_s): Change type of field apptype.  Add fields
appversion and cardtype.  Adjust all app-*.c for the new type.
* scd/app.c (supported_app_list): New.
(strapptype): New.
(apptype_from_name): New.
(app_dump_state): Use strapptype.
(app_write_learn_status): Ditto.
(app_getattr): Ditto.
(check_conflict): Use apptype_from_name and integer comparison.
* scd/app-openpgp.c: Replace app->card_version by app->appversion.
--

This is another patch to make backporting from 2.3 easier.
This commit is contained in:
Werner Koch 2021-02-19 09:17:06 +01:00
parent 6380126b31
commit 43b3ec5aee
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
8 changed files with 108 additions and 26 deletions

View file

@ -552,7 +552,7 @@ app_select_dinsig (app_t app)
rc = iso7816_select_application (slot, aid, sizeof aid, 0);
if (!rc)
{
app->apptype = "DINSIG";
app->apptype = APPTYPE_DINSIG;
app->fnc.learn_status = do_learn_status;
app->fnc.readcert = do_readcert;