Cryptoki: a cryptographic Token Interface



Download 360.55 Kb.
Page26/196
Date22.12.2023
Size360.55 Kb.
#63026
1   ...   22   23   24   25   26   27   28   29   ...   196
v201-95
pkcs11-base-v2.40-cos01

7.3.2. Win16


Developers using a pre-5.0 version of Microsoft Developer Studio to produce C or C++ code which implements or makes use of a Win16 Cryptoki .dll might issue the following directives before including any Cryptoki header files:
#pragma pack(1)

#define CK_PTR far *


#define CK_DEFINE_FUNCTION(returnType, name) \


returnType __export _far _pascal name

#define CK_DECLARE_FUNCTION(returnType, name) \


returnType __export _far _pascal name

#define CK_DECLARE_FUNCTION_POINTER(returnType, name) \


returnType __export _far _pascal (* name)

#define CK_CALLBACK_FUNCTION(returnType, name) \


returnType _far _pascal (* name)

#ifndef NULL_PTR


#define NULL_PTR 0
#endif

7.3.3. Generic UNIX


Developers performing generic UNIX development might issue the following directives before including any Cryptoki header files:
#define CK_PTR *

#define CK_DEFINE_FUNCTION(returnType, name) \


returnType name

#define CK_DECLARE_FUNCTION(returnType, name) \


returnType name

#define CK_DECLARE_FUNCTION_POINTER(returnType, name) \


returnType (* name)

#define CK_CALLBACK_FUNCTION(returnType, name) \


returnType (* name)

#ifndef NULL_PTR


#define NULL_PTR 0
#endif

8. General data types


The general Cryptoki data types are described in the following subsections. The data types for holding parameters for various mechanisms, and the pointers to those parameters, are not described here; these types are described with the information on the mechanisms themselves, in Section .
A C or C++ source file in a Cryptoki application or library can define all these types (the types described here and the types that are specifically used for particular mechanism parameters) by including the top-level Cryptoki include file, pkcs11.h. pkcs11.h, in turn, includes the other Cryptoki include files, pkcs11t.h and pkcs11f.h. A source file can also include just pkcs11t.h (instead of pkcs11.h); this defines most (but not all) of the types specified here.
When including either of these header files, a source file must specify the preprocessor directives indicated in Section .

Download 360.55 Kb.

Share with your friends:
1   ...   22   23   24   25   26   27   28   29   ...   196




The database is protected by copyright ©ininet.org 2024
send message

    Main page