From 24033dc8aeaa3b34650890b6f7055dcfdea213b8 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 10 Oct 2023 11:55:25 +0200 Subject: [PATCH] scd:openpgp: Very minor refactoring * scd/app-openpgp.c (app_select_openpgp): Move AID definition to ... (openpgp_aid): new. --- scd/app-openpgp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index 6b332295c..2ea7fc40e 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -52,7 +52,6 @@ #include #include "scdaemon.h" - #include "../common/util.h" #include "../common/i18n.h" #include "iso7816.h" @@ -64,6 +63,9 @@ #define KDF_DATA_LENGTH_MIN 90 #define KDF_DATA_LENGTH_MAX 110 +/* The AID of this application. */ +static char const openpgp_aid[] = { 0xD2, 0x76, 0x00, 0x01, 0x24, 0x01 }; + /* A table describing the DOs of the card. */ static struct { int tag; @@ -5594,7 +5596,6 @@ parse_algorithm_attribute (app_t app, int keyno) gpg_error_t app_select_openpgp (app_t app) { - static char const aid[] = { 0xD2, 0x76, 0x00, 0x01, 0x24, 0x01 }; int slot = app_get_slot (app); gpg_error_t err; unsigned char *buffer; @@ -5603,7 +5604,8 @@ app_select_openpgp (app_t app) /* Note that the card can't cope with P2=0xCO, thus we need to pass a special flag value. */ - err = iso7816_select_application (slot, aid, sizeof aid, 0x0001); + err = iso7816_select_application (slot, + openpgp_aid, sizeof openpgp_aid, 0x0001); if (!err) { unsigned int manufacturer;