From 7c82839fba58b41f3875aa6a64bebf2c10261d7a Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Thu, 21 Feb 2013 23:45:09 +0900 Subject: [PATCH] apply GPG_DO_DISCRETIONARY from master --- ChangeLog | 6 ++++++ src/openpgp-do.c | 11 ++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 84b5bc6..2b8d362 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-02-22 Niibe Yutaka + + * src/openpgp-do.c (GPG_DO_DISCRETIONARY, cmp_discretionary): New. + (cmp_app_data): Change to factor out GPG_DO_DISCRETIONARY. + (gpg_do_table): Add GPG_DO_DISCRETIONARY. + 2013-02-15 Niibe Yutaka * Version 1.0.2. diff --git a/src/openpgp-do.c b/src/openpgp-do.c index e3f5b73..14d8acf 100644 --- a/src/openpgp-do.c +++ b/src/openpgp-do.c @@ -241,7 +241,7 @@ static const struct do_table_entry *get_do_entry (uint16_t tag); #define GPG_DO_LOGIN_DATA 0x005e #define GPG_DO_CH_DATA 0x0065 #define GPG_DO_APP_DATA 0x006e -/* XXX: 0x0073 ??? */ +#define GPG_DO_DISCRETIONARY 0x0073 #define GPG_DO_SS_TEMP 0x007a #define GPG_DO_DS_COUNT 0x0093 #define GPG_DO_EXTCAP 0x00c0 @@ -989,10 +989,14 @@ static const uint16_t cmp_ch_data[] = { }; static const uint16_t cmp_app_data[] = { - 10, + 3, GPG_DO_AID, GPG_DO_HIST_BYTES, - /* XXX Discretionary data objects 0x0073 ??? */ + GPG_DO_DISCRETIONARY, +}; + +static const uint16_t cmp_discretionary[] = { + 8, GPG_DO_EXTCAP, GPG_DO_ALG_SIG, GPG_DO_ALG_DEC, GPG_DO_ALG_AUT, GPG_DO_PW_STATUS, @@ -1038,6 +1042,7 @@ gpg_do_table[] = { /* Compound data: Read access only */ { GPG_DO_CH_DATA, DO_CMP_READ, AC_ALWAYS, AC_NEVER, cmp_ch_data }, { GPG_DO_APP_DATA, DO_CMP_READ, AC_ALWAYS, AC_NEVER, cmp_app_data }, + { GPG_DO_DISCRETIONARY, DO_CMP_READ, AC_ALWAYS, AC_NEVER, cmp_discretionary }, { GPG_DO_SS_TEMP, DO_CMP_READ, AC_ALWAYS, AC_NEVER, cmp_ss_temp }, /* Simple data: write access only */ { GPG_DO_RESETTING_CODE, DO_PROC_WRITE, AC_NEVER, AC_ADMIN_AUTHORIZED,