Skip to content

Commit

Permalink
API: Add new PD capabilities introduced in OSDP v2.2
Browse files Browse the repository at this point in the history
Also, advertise LibOSDP PD to be "SIA 2.2" compliant.

Signed-off-by: Siddharth Chandrasekaran <[email protected]>
  • Loading branch information
sidcha committed Dec 5, 2024
1 parent 15d70c3 commit c70dd75
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
16 changes: 16 additions & 0 deletions include/osdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
2 changes: 2 additions & 0 deletions src/osdp_cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down
5 changes: 5 additions & 0 deletions src/osdp_pd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down

0 comments on commit c70dd75

Please sign in to comment.