Addresses #59, ykcs11 still has issues on Win64.

This commit is contained in:
Alessio Di Mauro
2016-01-11 12:45:09 +01:00
parent 8d29845b51
commit 018821e99d
2 changed files with 16 additions and 4 deletions
+8
View File
@@ -239,6 +239,9 @@ extern "C" {
#define __PASTE(x,y) x##y
#if defined _WIN32 || _WIN64
#pragma pack(push, cryptoki, 1)
#endif
/* packing defines */
//#include "pkcs11p.h" // TODO: msc specific?
@@ -309,6 +312,11 @@ struct CK_FUNCTION_LIST {
/* unpack */
//#include "pkcs11u.h" // TODO: msc specific?
#if defined _WIN32 || _WIN64
#pragma pack(pop, cryptoki)
#endif
#ifdef __cplusplus
}
#endif
+8 -4
View File
@@ -108,7 +108,9 @@ typedef CK_VOID_PTR CK_PTR CK_VOID_PTR_PTR;
/* pack */
//#include "pkcs11p.h" // TODO: msc specific?
#if defined _WIN32 || _WIN64
#pragma pack(push, cryptoki, 1)
#endif
typedef struct CK_VERSION {
CK_BYTE major; /* integer portion of version number */
@@ -1182,9 +1184,6 @@ typedef CK_EXTRACT_PARAMS CK_PTR CK_EXTRACT_PARAMS_PTR;
#define CKA_NETSCAPE_DB 0xD5A0DB00UL
#define CKA_NETSCAPE_TRUST 0x80000001UL
/* undo packing */
//#include "pkcs11u.h" // TODO: msc specific?
// YUBICO specific attributes
#define CKA_TOUCH_PIN_DEFAULT 0x00000000U
#define CKA_TOUCH_ALWAYS 0x00000001U
@@ -1193,4 +1192,9 @@ typedef CK_EXTRACT_PARAMS CK_PTR CK_EXTRACT_PARAMS_PTR;
#define CKA_PIN_NEVER 0x00000008U
#define CKA_TOUCH_NEVER 0x00000016U
/* undo packing */
#if defined _WIN32 || _WIN64
#pragma pack(pop, cryptoki)
#endif
#endif