This commit is contained in:
Alessio Di Mauro
2015-07-06 17:08:26 +02:00
parent 9f6dfed7cd
commit 7777ac3dad
2 changed files with 25 additions and 8 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ CK_PKCS11_FUNCTION_INFO(C_Finalize)
CK_PKCS11_FUNCTION_INFO(C_GetInfo) CK_PKCS11_FUNCTION_INFO(C_GetInfo)
#ifdef CK_NEED_ARG_LIST #ifdef CK_NEED_ARG_LIST
( (
CK_VOID_PTR pInfo /* location that receives information */ CK_INFO_PTR pInfo /* location that receives information */
); );
#endif #endif
+20 -3
View File
@@ -13,6 +13,9 @@
#define YKCS11_DBG 1 // General debug, must be either 1 or 0 #define YKCS11_DBG 1 // General debug, must be either 1 or 0
#define YKCS11_DINOUT 1 // Function in/out debug, must be either 1 or 0 #define YKCS11_DINOUT 1 // Function in/out debug, must be either 1 or 0
#define YKCS11_MANUFACTURER "Yubico (www.yubico.com)"
#define YKCS11_LIBDESC "PKCS#11 PIV Library (SP-800-73)"
#define PIV_MIN_PIN_LEN 6 #define PIV_MIN_PIN_LEN 6
#define PIV_MAX_PIN_LEN 8 #define PIV_MAX_PIN_LEN 8
@@ -82,11 +85,24 @@ CK_DEFINE_FUNCTION(CK_RV, C_Finalize)(
} }
CK_DEFINE_FUNCTION(CK_RV, C_GetInfo)( CK_DEFINE_FUNCTION(CK_RV, C_GetInfo)(
CK_VOID_PTR pInfo CK_INFO_PTR pInfo
) )
{ {
DBG(("In")); DIN;
CK_VERSION ver = {0.0};
pInfo->cryptokiVersion = function_list.version;
memset(pInfo->manufacturerID, ' ', sizeof(pInfo->manufacturerID));
strcpy(pInfo->manufacturerID, YKCS11_MANUFACTURER);
pInfo->flags = 0;
memset(pInfo->libraryDescription, ' ', sizeof(pInfo->libraryDescription));
strcpy(pInfo->libraryDescription, YKCS11_LIBDESC);
pInfo->libraryVersion = ver;
DOUT;
return CKR_OK; return CKR_OK;
} }
@@ -949,8 +965,9 @@ CK_DEFINE_FUNCTION(CK_RV, C_CancelFunction)(
return CKR_OK; return CKR_OK;
} }
CK_FUNCTION_LIST function_list = { CK_FUNCTION_LIST function_list = {
{ 2, 24 }, { 2, 40 },
C_Initialize, C_Initialize,
C_Finalize, C_Finalize,
C_GetInfo, C_GetInfo,