More object handling.
This commit is contained in:
+38
-2
@@ -67,8 +67,43 @@ static const CK_MECHANISM_INFO token_mechanism_infos[] = { // KEEP ALIGNED WITH
|
||||
{0, 0, CKF_DIGEST} // CKM_SHA512
|
||||
};
|
||||
|
||||
static const piv_obj_id_t token_objects[] = {
|
||||
|
||||
static const piv_obj_id_t token_objects[] = { // TODO: is there a way to get this from the token?
|
||||
PIV_OBJ_CCC, // Card capability container
|
||||
PIV_OBJ_CHUI, // Cardholder unique id
|
||||
PIV_OBJ_X509_PIV_AUTH, // PIV authentication
|
||||
PIV_OBJ_CHF, // Cardholder fingerprints
|
||||
PIV_OBJ_SEC_OBJ, // Security object
|
||||
PIV_OBJ_CHFI, // Cardholder facial images
|
||||
PIV_OBJ_X509_CARD_AUTH, // Certificate for card authentication
|
||||
PIV_OBJ_X509_DS, // Certificate for digital signature
|
||||
PIV_OBJ_X509_KM, // Certificate for key management
|
||||
//PIV_OBJ_PI, // Cardholder printed information
|
||||
//PIV_OBJ_DISCOVERY, // Discovery object
|
||||
//PIV_OBJ_HISTORY, // History object
|
||||
/* PIV_OBJ_RETIRED_X509_1, // Retired certificate for KM 1
|
||||
PIV_OBJ_RETIRED_X509_2, // Retired certificate for KM 2
|
||||
PIV_OBJ_RETIRED_X509_3, // Retired certificate for KM 3
|
||||
PIV_OBJ_RETIRED_X509_4, // Retired certificate for KM 4
|
||||
PIV_OBJ_RETIRED_X509_5, // Retired certificate for KM 5
|
||||
PIV_OBJ_RETIRED_X509_6, // Retired certificate for KM 6
|
||||
PIV_OBJ_RETIRED_X509_7, // Retired certificate for KM 7
|
||||
PIV_OBJ_RETIRED_X509_8, // Retired certificate for KM 8
|
||||
PIV_OBJ_RETIRED_X509_9, // Retired certificate for KM 9
|
||||
PIV_OBJ_RETIRED_X509_10, // Retired certificate for KM 10
|
||||
PIV_OBJ_RETIRED_X509_11, // Retired certificate for KM 11
|
||||
PIV_OBJ_RETIRED_X509_12, // Retired certificate for KM 12
|
||||
PIV_OBJ_RETIRED_X509_13, // Retired certificate for KM 13
|
||||
PIV_OBJ_RETIRED_X509_14, // Retired certificate for KM 14
|
||||
PIV_OBJ_RETIRED_X509_15, // Retired certificate for KM 15
|
||||
PIV_OBJ_RETIRED_X509_16, // Retired certificate for KM 16
|
||||
PIV_OBJ_RETIRED_X509_17, // Retired certificate for KM 17
|
||||
PIV_OBJ_RETIRED_X509_18, // Retired certificate for KM 18
|
||||
PIV_OBJ_RETIRED_X509_19, // Retired certificate for KM 19
|
||||
PIV_OBJ_RETIRED_X509_20, // Retired certificate for KM 20*/
|
||||
//PIV_OBJ_IRIS_IMAGE, // Cardholder iris images
|
||||
//PIV_OBJ_BITGT, // Biometric information templates group template
|
||||
//PIV_OBJ_SM_SIGNER, // Secure messaging signer
|
||||
//PIV_OBJ_PC_REF_DATA, // Pairing code reference data
|
||||
};
|
||||
static const CK_ULONG token_objects_num = sizeof(token_objects) / sizeof(piv_obj_id_t);
|
||||
|
||||
@@ -220,6 +255,7 @@ CK_RV YUBICO_get_token_mechanism_info(CK_MECHANISM_TYPE mec, CK_MECHANISM_INFO_P
|
||||
CK_RV YUBICO_get_token_objects_num(CK_ULONG_PTR num) {
|
||||
|
||||
*num = token_objects_num;
|
||||
//fprintf("TIENI %lu\n", token_objects_num);
|
||||
return CKR_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user