8 #ifndef _DEVICE_DEFINED
10 #define _DEVICE_DEFINED
14 #define MAX_ERRMSG_SIZE 512
24 #define DEVICE_NEEDSLOGIN 0x0001
25 #define DEVICE_READONLY 0x0002
26 #define DEVICE_REMOVABLE 0x0004
27 #define DEVICE_ACTIVE 0x0008
28 #define DEVICE_LOGGEDIN 0x0010
29 #define DEVICE_TIME 0x0020
39 int ( *MECHANISM_FUNCTION )(
IN_OPT void *deviceInfoPtr,
44 const MECHANISM_FUNCTION
function;
51 int ( *CREATEOBJECT_FUNCTION )( INOUT \
52 MESSAGE_CREATEOBJECT_INFO *objectInfo,
57 const CREATEOBJECT_FUNCTION
function;
107 #if defined( __WIN32__ ) && VC_GE_2005( _MSC_VER )
108 #define CAPI_HANDLE ULONG_PTR
110 #define CAPI_HANDLE unsigned long
145 #define deviceSystem deviceInfo.systemInfo
146 #define devicePKCS11 deviceInfo.pkcs11Info
147 #define deviceCryptoAPI deviceInfo.cryptoapiInfo
148 #define deviceHardware deviceInfo.hardwareInfo
206 STDC_NONNULL_ARG( ( 1, 2, 5 ) );
209 STDC_NONNULL_ARG( ( 1 ) );
215 STDC_NONNULL_ARG( ( 1, 4 ) );
224 STDC_NONNULL_ARG( ( 1, 2, 3, 5 ) );
228 STDC_NONNULL_ARG( ( 1, 2, 3 ) );
230 int ( *getRandomFunction)(
INOUT struct
DI *deviceInfo,
299 #define deviceInitPKCS11() CRYPT_OK
300 #define deviceEndPKCS11()
301 #define setDevicePKCS11( x, y, z ) CRYPT_ARGERROR_NUM1
310 #define deviceInitCryptoAPI() CRYPT_OK
311 #define deviceEndCryptoAPI()
312 #define setDeviceCryptoAPI( x ) CRYPT_ARGERROR_NUM1
321 #define deviceInitHardware() CRYPT_OK
322 #define deviceEndHardware()
323 #define setDeviceHardware( x ) CRYPT_ARGERROR_NUM1