31#define ALGO_ECDSA 0x13
32#define ALGO_EDDSA 0x16
40#define OPENPGP_PW1_MIN_LEN 6
41#define OPENPGP_PW3_MIN_LEN 8
42#define OPENPGP_PIN_MAX_LEN 32
46#define DO_HIST_BYTES 0x5F52
47#define DO_CARDHOLDER 0x0065
48#define DO_APP_RELATED 0x006E
49#define DO_DISCRET_DO 0x0073
50#define DO_EXT_CAP 0x00C0
51#define DO_ALGO_SIG 0x00C1
52#define DO_ALGO_DEC 0x00C2
53#define DO_ALGO_AUT 0x00C3
54#define DO_PW_STATUS 0x00C4
56#define DO_FP_SIG 0x00C7
57#define DO_FP_DEC 0x00C8
58#define DO_FP_AUT 0x00C9
59#define DO_CA_FP_1 0x00CA
60#define DO_CA_FP_2 0x00CB
61#define DO_CA_FP_3 0x00CC
70#define DO_GEN_TIME_ALL 0x00CD
71#define DO_GEN_TIME_SIG 0x00CE
72#define DO_GEN_TIME_DEC 0x00CF
73#define DO_GEN_TIME_AUT 0x00D0
74#define DO_SIG_COUNT 0x0093
76#define DO_LOGIN 0x005E
78#define DO_LANG_PREF 0x5F2D
80#define DO_UIF_SIG 0x00D6
81#define DO_UIF_DEC 0x00D7
82#define DO_UIF_AUT 0x00D8
83#define DO_KEY_INFO 0x00DE
84#define DO_SEC_TPL 0x007A
86#define DO_AES_KEY 0x00D5
87#define DO_CARDHOLDER_CERT 0x7F21
91#define SW_FILE_TERMINATED 0x6285
92#define SW_WRONG_LENGTH 0x6700
93#define SW_SECURITY_NOT_SATISFIED 0x6982
94#define SW_AUTH_METHOD_BLOCKED 0x6983
95#define SW_CONDITIONS_NOT_SATISFIED 0x6985
96#define SW_WRONG_DATA 0x6A80
97#define SW_FILE_NOT_FOUND 0x6A82
98#define SW_INCORRECT_P1P2 0x6A86
99#define SW_REFERENCED_DATA_NOT_FOUND 0x6A88
100#define SW_WRONG_P1P2 0x6B00
101#define SW_INS_NOT_SUPPORTED 0x6D00
102#define SW_CLA_NOT_SUPPORTED 0x6E00
103#define SW_UNKNOWN 0x6F00
111 uint8_t *resp,
size_t resp_max);
char name[cdc::hal::ISecureElement::RMEM_NAME_LEN]
const uint8_t * OPENPGP_AID
bool openpgp_get_fingerprint(uint8_t key_type, uint8_t *fp_out)
Reads the stored OpenPGP v4 fingerprint for a key role.
uint32_t openpgp_get_gen_time(uint8_t key_type)
Returns the stored Unix timestamp of key generation, or 0 when unset.
int openpgp_process_apdu(const uint8_t *cmd, size_t cmd_len, uint8_t *resp, size_t resp_max)
bool openpgp_set_key_fingerprint(uint8_t key_type, const uint8_t *fingerprint, uint32_t gen_time)
size_t openpgp_get_cardholder_name(char *out, size_t out_size)
Copies the cardholder name (OpenPGP DO 0x5B) into the caller buffer. Format is gpg's "Surname<<Firstn...
bool openpgp_set_cardholder_name(const char *name)
Sets the cardholder name (OpenPGP DO 0x5B) and persists state.
uint32_t openpgp_get_sig_count(void)
bool openpgp_has_any_key(void)
Reports whether any of the SIG / DEC / AUT roles has a non-zero fingerprint configured....
bool openpgp_is_selected(void)
const uint8_t OPENPGP_AID_LEN
void openpgp_factory_reset(void)