Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
pkcs11p6r.h
Go to the documentation of this file.
1 
11 #ifndef _PKCS11P6R_H_
12 #define _PKCS11P6R_H_ 1
13 
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 /* [A] The following P6R vendor initialization flags are defined: */
24 #define CKF_P6R_LOGGINGON 0x80000000UL
25 
26 
27 /* [B] The following P6R vendor attribute types are defined: */
28 
29 /* CKA_P6R_GROUP
30  Purpose: to allow PKCS 11 objects to be placed into collections
31  Data Type: RFC 2279 string
32  MUST be specified when object is created with C_CreateObject.
33  MUST be specified when object is created with C_GenerateKey or C_GenerateKeyPair.
34  */
35 #define CKA_P6R_GROUP 0x80001000UL
36 
37 /* CKA_P6R_EXT1
38  Purpose: to allow a user to associate whatever data they want to an object
39  Data Type: Byte Array
40  Can be created and modified at any time
41  */
42 #define CKA_P6R_EXT1 0x80001002UL
43 
44 /* CKA_P6R_UUID
45  Purpose: every PKCS#11 object is assigned a unique identifier by a token
46  Data Type: RFC2279 string
47  Read only attribute, created by token
48  */
49 #define CKA_P6R_UUID 0x80001004UL
50 
51 
52 /* [C] The following P6R vendor methods are defined: */
60 extern CK_DECLARE_FUNCTION(CK_RV, P6R_GetSlotList)
61 (
62  CK_ULONG slotId, /* input: P6R slot number for 3rd party token */
63  CK_BBOOL tokenPresent, /* input: same as C_GetSlotList */
64  CK_SLOT_ID_PTR pSlotList, /* output: same as C_GetSlotList */
65  CK_ULONG_PTR pulCount /* input/output: same as C_GetSlotList */
66 );
67 
68 
69 /* P6R_DeleteSlot frees all contents in the token and disables its containing slot */
84 extern CK_DECLARE_FUNCTION(CK_RV, P6R_DeleteSlot)
85 (
86  CK_SLOT_ID slotID, /* input: ID of the token's slot */
87  CK_UTF8CHAR_PTR pPin, /* input: the SO's initial PIN */
88  CK_ULONG ulPinLen /* input: length in bytes of the PIN */
89 );
90 
91 
104 extern CK_DECLARE_FUNCTION(CK_RV, P6R_AddSlot)
105 (
106  CK_SLOT_ID slotId /* input: the slot to add from the p6pkcs11.conf file */
107 );
108 
109 
121 extern CK_DECLARE_FUNCTION(CK_RV, P6R_GetKMIPClient)
122 (
123  CK_SESSION_HANDLE hSession, /* input: the identifier value returned by a call to C_OpenSession() */
124  CK_VOID_PTR_PTR pKMIP /* output: p6IKMIPClient3 pointer to an active KMIP Client object for an open session for a KMIP token */
125 );
126 
127 
139 extern CK_DECLARE_FUNCTION( CK_RV, P6R_Conversions )
140 (
141  CK_SESSION_HANDLE hSession, /* input: the identifier value returned by a call to C_OpenSession() */
142  CK_OBJECT_CLASS objectType, /* input: type of PKCS#11 object to convert */
143  CK_ULONG convertCount, /* input: number of PKCS#11 object to attempt to convert */
144  CK_ULONG convertCode, /* input: type of conversion to perform, currently only "1" supported */
145  CK_ULONG_PTR pConverted /* output: number of objects successfully converted */
146 );
147 
148 
149 // [D] Supported 3rd party token extensions defined
150 /* Vendor defined user login types
151  * Purpose:
152  * login type for Utimaco CryptoServer user (used for Admin login)
153  */
154 #define CKU_CS_GENERIC 0x83
155 
156 
162 extern CK_DECLARE_FUNCTION(CK_RV, Thales_C_LoginBegin)
163 (
164  CK_SESSION_HANDLE hSession, /* the session's handle */
165  CK_USER_TYPE userType, /* the user type */
166  CK_ULONG_PTR pulK, /* cards required to load logical token*/
167  CK_ULONG_PTR pulN /* Number of cards in set */
168 );
169 
170 extern CK_DECLARE_FUNCTION(CK_RV, Thales_C_LoginNext)
171 (
172  CK_SESSION_HANDLE hSession, /* the session's handle */
173  CK_USER_TYPE userType, /* the user type*/
174  CK_CHAR_PTR pPin, /* the user's PIN*/
175  CK_ULONG ulPinLen, /* the length of the PIN */
176  CK_ULONG_PTR pulSharesLeft /* Number of shares still needed */
177 );
178 
179 extern CK_DECLARE_FUNCTION(CK_RV, Thales_C_LoginEnd)
180 (
181  CK_SESSION_HANDLE hSession, /* the session's handle */
182  CK_USER_TYPE userType /* the user type*/
183 );
184 
185 
193 extern CK_DECLARE_FUNCTION(CK_RV, Futurex_C_FX_GetLogFile)( CK_SLOT_ID P6RslotId, CK_RV* pRV, CK_CHAR_PTR szLogFile, CK_LONG* piLen );
194 
195 extern CK_DECLARE_FUNCTION(CK_LONG, Futurex_C_FX_GetLogMode)( CK_SLOT_ID P6RslotId );
196 
197 extern CK_DECLARE_FUNCTION(CK_LONG, Futurex_C_FX_GetKeyClarityMode)( CK_SLOT_ID P6RslotId );
198 
199 extern CK_DECLARE_FUNCTION(void, Futurex_C_FX_MemFree)( CK_SLOT_ID P6RslotId, CK_VOID_PTR pvMem );
200 
201 extern CK_DECLARE_FUNCTION(CK_CHAR_PTR, Futurex_C_FX_HexEncode)( CK_SLOT_ID P6RslotId, const CK_CHAR_PTR pauclnput, CK_LONG iLen );
202 
203 extern CK_DECLARE_FUNCTION(CK_CHAR_PTR, Futurex_C_FX_HexDecode)( CK_SLOT_ID P6RslotId, CK_CHAR_PTR pszInput );
204 
205 extern CK_DECLARE_FUNCTION(void, Futurex_C_FX_FreeTemplate)( CK_SLOT_ID P6RslotId, CK_ATTRIBUTE_PTR ptTemplate, CK_ULONG ulNumAttributes );
206 
207 extern CK_DECLARE_FUNCTION(void, Futurex_C_FX_SleepMS)( CK_SLOT_ID P6RslotId, CK_ULONG ulSleepTime );
208 
209 extern CK_DECLARE_FUNCTION(CK_ULONG, Futurex_C_FX_ThreadID)( CK_SLOT_ID P6RslotId );
210 
211 extern CK_DECLARE_FUNCTION(CK_RV, Futurex_C_FX_ReloadTokenInfo)( CK_SLOT_ID P6RslotId, CK_SLOT_ID ulSlotID );
212 
213 extern CK_DECLARE_FUNCTION(CK_CHAR_PTR, Futurex_C_FX_GetClassString)( CK_SLOT_ID P6RslotId, CK_OBJECT_CLASS ocClass );
214 
215 extern CK_DECLARE_FUNCTION(CK_CHAR_PTR, Futurex_C_FX_GetKeyTypeString)( CK_SLOT_ID P6RslotId, CK_KEY_TYPE ktKeyType );
216 
217 extern CK_DECLARE_FUNCTION(CK_CHAR_PTR, Futurex_C_FX_GetErrorString)( CK_SLOT_ID P6RslotId, CK_RV ckrv );
218 
219 extern CK_DECLARE_FUNCTION(CK_CHAR_PTR, Futurex_C_FX_GetMechanismString)( CK_SLOT_ID P6RslotId, CK_MECHANISM_TYPE ulMech );
220 
221 extern CK_DECLARE_FUNCTION(CK_RV, Futurex_C_FX_SendMessageSynch)
222 (
223  CK_SESSION_HANDLE hSession,
228 );
229 
230 extern CK_DECLARE_FUNCTION(CK_SLOT_ID, Futurex_C_FX_GetObjectSlot)( CK_SLOT_ID P6RslotId, CK_OBJECT_HANDLE hObject );
231 
232 extern CK_DECLARE_FUNCTION(CK_VOID_PTR, Futurex_C_FX_GenericCreateMutex)( CK_SLOT_ID P6RslotId );
233 
234 extern CK_DECLARE_FUNCTION(CK_BBOOL, Futurex_C_FX_GenericLockMutex)( CK_SLOT_ID P6RslotId, CK_VOID_PTR pMutex );
235 
236 extern CK_DECLARE_FUNCTION(CK_BBOOL, Futurex_C_FX_GenericUnlockMutex)( CK_SLOT_ID P6RslotId, CK_VOID_PTR pMutex );
237 
238 extern CK_DECLARE_FUNCTION(CK_BBOOL, Futurex_C_FX_GenericDestroyMutex)( CK_SLOT_ID P6RslotId, CK_VOID_PTR pMutex );
239 
240 
241 
247 /* CKK_HPE_AES_NSPWRAPPED
248  Purpose: to be used for a CKA_KEY_TYPE attribute indicating an AES key wrapped in the HSM's MFK.
249  Data Type: the symmetric key is an ASCII array of bytes.
250  The HPE Atalla HSM token is designed to store keys that have been generated by the Atalla HSM.
251  These keys are always wrapped when they are outside of the Atalla HSM hardware boundary.
252  This vendor defined key type is to allow AES keys to be imported into the HPE token.
253  */
254 #define CKK_HPE_AES_NSPWRAPPED 0x88000000UL
255 
256 /* CKK_HPE_DES_NSPWRAPPED, CKK_HPE_DES2_NSPWRAPPED, CKK_HPE_DES3_NSPWRAPPED
257  Purpose: to be used for a CKA_KEY_TYPE attribute indicating a DES key wrapped in the HSM's MFK.
258  Data Type: the symmetric key is an ASCII array of bytes.
259  The HPE Atalla HSM token is designed to store keys that have been generated by the Atalla HSM.
260  These keys are always wrapped when they are outside of the Atalla HSM hardware boundary.
261  This vendor defined key type is to allow DES keys to be imported into the HPE token.
262  */
263 #define CKK_HPE_DES_NSPWRAPPED 0x88000001UL
264 #define CKK_HPE_DES2_NSPWRAPPED 0x88000002UL
265 #define CKK_HPE_DES3_NSPWRAPPED 0x88000003UL
266 
267 /* CKK_HPE_RSAPUB_NSPWRAPPED (public key), CKK_HPE_RSAPRV_NSPWRAPPED (private key)
268  Purpose: to be used for a CKA_KEY_TYPE attribute indicating a RSA key wrapped in the HSM's MFK.
269  Data Type: the symmetric key is an ASCII array of bytes.
270  The HPE Atalla HSM token is designed to store keys that have been generated by the Atalla HSM.
271  These keys are always wrapped when they are outside of the Atalla HSM hardware boundary.
272  This vendor defined key type is to allow RSA keys to be imported into the HPE token.
273  */
274 #define CKK_HPE_RSAPUB_NSPWRAPPED 0x88000004UL
275 #define CKK_HPE_RSAPRV_NSPWRAPPED 0x88000005UL
276 
277 #define CKR_ATTRIBUTE_MODULUS_WRITE 0x88000001UL
278 
279 #ifdef __cplusplus
280 }
281 #endif
282 
283 #endif
CK_RV * pRV
Definition: pkcs11p6r.h:193
CK_ULONG CK_KEY_TYPE
Definition: pkcs11t.h:332
CK_SLOT_ID ulSlotID
Definition: pkcs11p6r.h:211
CK_USER_TYPE CK_ULONG_PTR CK_ULONG_PTR pulN
Definition: pkcs11p6r.h:165
CK_ULONG CK_OBJECT_HANDLE
Definition: pkcs11t.h:294
CK_USER_TYPE CK_CHAR_PTR CK_ULONG CK_ULONG_PTR pulSharesLeft
Definition: pkcs11p6r.h:173
CK_VOID_PTR pMutex
Definition: pkcs11p6r.h:234
CK_RV ckrv
Definition: pkcs11p6r.h:217
CK_VOID_PTR CK_PTR CK_VOID_PTR_PTR
Definition: pkcs11t.h:65
CK_OBJECT_CLASS objectType
Definition: pkcs11p6r.h:142
CK_OBJECT_CLASS CK_ULONG convertCount
Definition: pkcs11p6r.h:142
CK_ATTRIBUTE_PTR CK_ULONG ulNumAttributes
Definition: pkcs11p6r.h:205
CK_VOID_PTR_PTR pKMIP
Definition: pkcs11p6r.h:125
CK_ULONG CK_MECHANISM_TYPE
Definition: pkcs11t.h:580
CK_RV CK_CHAR_PTR szLogFile
Definition: pkcs11p6r.h:193
CK_BBOOL tokenPresent
Definition: pkcs11p6r.h:63
CK_ATTRIBUTE_PTR ptTemplate
Definition: pkcs11p6r.h:205
CK_OBJECT_CLASS CK_ULONG CK_ULONG convertCode
Definition: pkcs11p6r.h:142
unsigned long int CK_ULONG
Definition: pkcs11t.h:44
CK_OBJECT_CLASS CK_ULONG CK_ULONG CK_ULONG_PTR pConverted
Definition: pkcs11p6r.h:142
CK_UTF8CHAR_PTR CK_ULONG ulPinLen
Definition: pkcs11p6r.h:87
const CK_CHAR_PTR CK_LONG iLen
Definition: pkcs11p6r.h:201
void CK_PTR CK_VOID_PTR
Definition: pkcs11t.h:62
CK_ULONG CK_SLOT_ID
Definition: pkcs11t.h:100
const CK_CHAR_PTR binMessage
Definition: pkcs11p6r.h:224
CK_USER_TYPE CK_ULONG_PTR pulK
Definition: pkcs11p6r.h:165
CK_SLOT_ID CK_PTR CK_SLOT_ID_PTR
Definition: pkcs11t.h:102
const CK_CHAR_PTR CK_ULONG ulMessageLen
Definition: pkcs11p6r.h:224
#define CK_DECLARE_FUNCTION(returnType, name)
Definition: pkcs11.h:115
CK_VOID_PTR pvMem
Definition: pkcs11p6r.h:199
const CK_CHAR_PTR pauclnput
Definition: pkcs11p6r.h:201
CK_CHAR_PTR pszInput
Definition: pkcs11p6r.h:203
CK_RV CK_CHAR_PTR CK_LONG * piLen
Definition: pkcs11p6r.h:193
CK_ULONG CK_OBJECT_CLASS
Definition: pkcs11t.h:303
CK_KEY_TYPE ktKeyType
Definition: pkcs11p6r.h:215
CK_CHAR CK_PTR CK_CHAR_PTR
Definition: pkcs11t.h:59
CK_BBOOL CK_SLOT_ID_PTR CK_ULONG_PTR pulCount
Definition: pkcs11p6r.h:63
CK_OBJECT_HANDLE hObject
Definition: pkcs11p6r.h:230
CK_ULONG ulSleepTime
Definition: pkcs11p6r.h:207
CK_ULONG CK_SESSION_HANDLE
Definition: pkcs11t.h:252
CK_BBOOL CK_SLOT_ID_PTR pSlotList
Definition: pkcs11p6r.h:63
CK_BYTE CK_BBOOL
Definition: pkcs11t.h:41
const CK_CHAR_PTR CK_ULONG CK_CHAR_PTR binResponse
Definition: pkcs11p6r.h:224
long int CK_LONG
Definition: pkcs11t.h:47
CK_OBJECT_CLASS ocClass
Definition: pkcs11p6r.h:213
CK_MECHANISM_TYPE ulMech
Definition: pkcs11p6r.h:219
const CK_CHAR_PTR CK_ULONG CK_CHAR_PTR CK_ULONG * pulResponseLen
Definition: pkcs11p6r.h:224
CK_ULONG CK_PTR CK_ULONG_PTR
Definition: pkcs11t.h:61
CK_USER_TYPE userType
Definition: pkcs11p6r.h:165
CK_ULONG CK_USER_TYPE
Definition: pkcs11t.h:258
CK_UTF8CHAR_PTR pPin
Definition: pkcs11p6r.h:87
CK_ULONG CK_RV
Definition: pkcs11t.h:1033
CK_ATTRIBUTE CK_PTR CK_ATTRIBUTE_PTR
Definition: pkcs11t.h:567
CK_UTF8CHAR CK_PTR CK_UTF8CHAR_PTR
Definition: pkcs11t.h:60