diff --git a/include/osdp.h b/include/osdp.h index 3df218e..1381d1e 100644 --- a/include/osdp.h +++ b/include/osdp.h @@ -185,6 +185,22 @@ enum osdp_pd_cap_function_code_e { */ OSDP_PD_CAP_BIOMETRICS, + /** + * This capability indicates if the reader is capable of supporting + * Secure Pin Entry (SPE) for smart cards + */ + OSDP_PD_CAP_SECURE_PIN_ENTRY, + + /** + * This capability indicates the version of OSDP the PD supports + * + * Compliance Levels: + * 0 - Unspecified + * 1 - IEC 60839-11-5 + * 2 - SIA OSDP 2.2 + */ + OSDP_PD_CAP_OSDP_VERSION, + /** * Capability Sentinel */ diff --git a/src/osdp_cp.c b/src/osdp_cp.c index 248314c..7147490 100644 --- a/src/osdp_cp.c +++ b/src/osdp_cp.c @@ -170,6 +170,8 @@ static const char *cp_get_cap_name(int cap) [OSDP_PD_CAP_SMART_CARD_SUPPORT] = "SmartCard", [OSDP_PD_CAP_READERS] = "Reader", [OSDP_PD_CAP_BIOMETRICS] = "Biometric", + [OSDP_PD_CAP_SECURE_PIN_ENTRY] = "SecurePinEntry", + [OSDP_PD_CAP_OSDP_VERSION] = "OsdpVersion", }; return cap_name[cap]; } diff --git a/src/osdp_pd.c b/src/osdp_pd.c index 4af28f3..0b18148 100644 --- a/src/osdp_pd.c +++ b/src/osdp_pd.c @@ -73,6 +73,11 @@ static struct osdp_pd_cap osdp_pd_cap[] = { BYTE_0(OSDP_PACKET_BUF_SIZE), BYTE_1(OSDP_PACKET_BUF_SIZE), }, + { + OSDP_PD_CAP_OSDP_VERSION, + 2, /* SIA OSDP 2.2 */ + 0, /* N/A */ + }, { -1, 0, 0 } /* Sentinel */ };