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: p6IKMIPClient2 pointer to an active KMIP Client object for an open session for a KMIP token */
125 );
126 
127 
128 // [D] Supported 3rd party token extensions defined
129 /* Vendor defined user login types
130  * Purpose:
131  * login type for Utimaco CryptoServer user (used for Admin login)
132  */
133 #define CKU_CS_GENERIC 0x83
134 
135 
141 extern CK_DECLARE_FUNCTION(CK_RV, Thales_C_LoginBegin)
142 (
143  CK_SESSION_HANDLE hSession, /* the session's handle */
144  CK_USER_TYPE userType, /* the user type */
145  CK_ULONG_PTR pulK, /* cards required to load logical token*/
146  CK_ULONG_PTR pulN /* Number of cards in set */
147 );
148 
149 extern CK_DECLARE_FUNCTION(CK_RV, Thales_C_LoginNext)
150 (
151  CK_SESSION_HANDLE hSession, /* the session's handle */
152  CK_USER_TYPE userType, /* the user type*/
153  CK_CHAR_PTR pPin, /* the user's PIN*/
154  CK_ULONG ulPinLen, /* the length of the PIN */
155  CK_ULONG_PTR pulSharesLeft /* Number of shares still needed */
156 );
157 
158 extern CK_DECLARE_FUNCTION(CK_RV, Thales_C_LoginEnd)
159 (
160  CK_SESSION_HANDLE hSession, /* the session's handle */
161  CK_USER_TYPE userType /* the user type*/
162 );
163 
164 
172 extern CK_DECLARE_FUNCTION(CK_RV, Futurex_C_FX_GetLogFile)( CK_SLOT_ID P6RslotId, CK_RV* pRV, CK_CHAR_PTR szLogFile, CK_LONG* piLen );
173 
174 extern CK_DECLARE_FUNCTION(CK_LONG, Futurex_C_FX_GetLogMode)( CK_SLOT_ID P6RslotId );
175 
176 extern CK_DECLARE_FUNCTION(CK_LONG, Futurex_C_FX_GetKeyClarityMode)( CK_SLOT_ID P6RslotId );
177 
178 extern CK_DECLARE_FUNCTION(void, Futurex_C_FX_MemFree)( CK_SLOT_ID P6RslotId, CK_VOID_PTR pvMem );
179 
180 extern CK_DECLARE_FUNCTION(CK_CHAR_PTR, Futurex_C_FX_HexEncode)( CK_SLOT_ID P6RslotId, const CK_CHAR_PTR pauclnput, CK_LONG iLen );
181 
182 extern CK_DECLARE_FUNCTION(CK_CHAR_PTR, Futurex_C_FX_HexDecode)( CK_SLOT_ID P6RslotId, CK_CHAR_PTR pszInput );
183 
184 extern CK_DECLARE_FUNCTION(void, Futurex_C_FX_FreeTemplate)( CK_SLOT_ID P6RslotId, CK_ATTRIBUTE_PTR ptTemplate, CK_ULONG ulNumAttributes );
185 
186 extern CK_DECLARE_FUNCTION(void, Futurex_C_FX_SleepMS)( CK_SLOT_ID P6RslotId, CK_ULONG ulSleepTime );
187 
188 extern CK_DECLARE_FUNCTION(CK_ULONG, Futurex_C_FX_ThreadID)( CK_SLOT_ID P6RslotId );
189 
190 extern CK_DECLARE_FUNCTION(CK_RV, Futurex_C_FX_ReloadTokenInfo)( CK_SLOT_ID P6RslotId, CK_SLOT_ID ulSlotID );
191 
192 extern CK_DECLARE_FUNCTION(CK_CHAR_PTR, Futurex_C_FX_GetClassString)( CK_SLOT_ID P6RslotId, CK_OBJECT_CLASS ocClass );
193 
194 extern CK_DECLARE_FUNCTION(CK_CHAR_PTR, Futurex_C_FX_GetKeyTypeString)( CK_SLOT_ID P6RslotId, CK_KEY_TYPE ktKeyType );
195 
196 extern CK_DECLARE_FUNCTION(CK_CHAR_PTR, Futurex_C_FX_GetErrorString)( CK_SLOT_ID P6RslotId, CK_RV ckrv );
197 
198 extern CK_DECLARE_FUNCTION(CK_CHAR_PTR, Futurex_C_FX_GetMechanismString)( CK_SLOT_ID P6RslotId, CK_MECHANISM_TYPE ulMech );
199 
200 extern CK_DECLARE_FUNCTION(CK_RV, Futurex_C_FX_SendMessageSynch)
201 (
202  CK_SESSION_HANDLE hSession,
207 );
208 
209 extern CK_DECLARE_FUNCTION(CK_SLOT_ID, Futurex_C_FX_GetObjectSlot)( CK_SLOT_ID P6RslotId, CK_OBJECT_HANDLE hObject );
210 
211 extern CK_DECLARE_FUNCTION(CK_VOID_PTR, Futurex_C_FX_GenericCreateMutex)( CK_SLOT_ID P6RslotId );
212 
213 extern CK_DECLARE_FUNCTION(CK_BBOOL, Futurex_C_FX_GenericLockMutex)( CK_SLOT_ID P6RslotId, CK_VOID_PTR pMutex );
214 
215 extern CK_DECLARE_FUNCTION(CK_BBOOL, Futurex_C_FX_GenericUnlockMutex)( CK_SLOT_ID P6RslotId, CK_VOID_PTR pMutex );
216 
217 extern CK_DECLARE_FUNCTION(CK_BBOOL, Futurex_C_FX_GenericDestroyMutex)( CK_SLOT_ID P6RslotId, CK_VOID_PTR pMutex );
218 
219 
220 
226 /* CKK_HPE_AES_NSPWRAPPED
227  Purpose: to be used for a CKA_KEY_TYPE attribute indicating an AES key wrapped in the HSM's MFK.
228  Data Type: the symmetric key is an ASCII array of bytes.
229  The HPE Atalla HSM token is designed to store keys that have been generated by the Atalla HSM.
230  These keys are always wrapped when they are outside of the Atalla HSM hardware boundary.
231  This vendor defined key type is to allow AES keys to be imported into the HPE token.
232  */
233 #define CKK_HPE_AES_NSPWRAPPED 0x88000000UL
234 
235 /* CKK_HPE_DES_NSPWRAPPED, CKK_HPE_DES2_NSPWRAPPED, CKK_HPE_DES3_NSPWRAPPED
236  Purpose: to be used for a CKA_KEY_TYPE attribute indicating a DES key wrapped in the HSM's MFK.
237  Data Type: the symmetric key is an ASCII array of bytes.
238  The HPE Atalla HSM token is designed to store keys that have been generated by the Atalla HSM.
239  These keys are always wrapped when they are outside of the Atalla HSM hardware boundary.
240  This vendor defined key type is to allow DES keys to be imported into the HPE token.
241  */
242 #define CKK_HPE_DES_NSPWRAPPED 0x88000001UL
243 #define CKK_HPE_DES2_NSPWRAPPED 0x88000002UL
244 #define CKK_HPE_DES3_NSPWRAPPED 0x88000003UL
245 
246 /* CKK_HPE_RSAPUB_NSPWRAPPED (public key), CKK_HPE_RSAPRV_NSPWRAPPED (private key)
247  Purpose: to be used for a CKA_KEY_TYPE attribute indicating a RSA key wrapped in the HSM's MFK.
248  Data Type: the symmetric key is an ASCII array of bytes.
249  The HPE Atalla HSM token is designed to store keys that have been generated by the Atalla HSM.
250  These keys are always wrapped when they are outside of the Atalla HSM hardware boundary.
251  This vendor defined key type is to allow RSA keys to be imported into the HPE token.
252  */
253 #define CKK_HPE_RSAPUB_NSPWRAPPED 0x88000004UL
254 #define CKK_HPE_RSAPRV_NSPWRAPPED 0x88000005UL
255 
256 
257 #ifdef __cplusplus
258 }
259 #endif
260 
261 #endif
CK_RV * pRV
Definition: pkcs11p6r.h:172
CK_ULONG CK_KEY_TYPE
Definition: pkcs11t.h:332
CK_SLOT_ID ulSlotID
Definition: pkcs11p6r.h:190
CK_USER_TYPE CK_ULONG_PTR CK_ULONG_PTR pulN
Definition: pkcs11p6r.h:144
CK_ULONG CK_OBJECT_HANDLE
Definition: pkcs11t.h:294
CK_USER_TYPE CK_CHAR_PTR CK_ULONG CK_ULONG_PTR pulSharesLeft
Definition: pkcs11p6r.h:152
CK_VOID_PTR pMutex
Definition: pkcs11p6r.h:213
CK_RV ckrv
Definition: pkcs11p6r.h:196
CK_VOID_PTR CK_PTR CK_VOID_PTR_PTR
Definition: pkcs11t.h:65
CK_ATTRIBUTE_PTR CK_ULONG ulNumAttributes
Definition: pkcs11p6r.h:184
CK_VOID_PTR_PTR pKMIP
Definition: pkcs11p6r.h:125
CK_ULONG CK_MECHANISM_TYPE
Definition: pkcs11t.h:579
CK_RV CK_CHAR_PTR szLogFile
Definition: pkcs11p6r.h:172
CK_BBOOL tokenPresent
Definition: pkcs11p6r.h:63
CK_ATTRIBUTE_PTR ptTemplate
Definition: pkcs11p6r.h:184
unsigned long int CK_ULONG
Definition: pkcs11t.h:44
CK_UTF8CHAR_PTR CK_ULONG ulPinLen
Definition: pkcs11p6r.h:87
const CK_CHAR_PTR CK_LONG iLen
Definition: pkcs11p6r.h:180
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:203
CK_USER_TYPE CK_ULONG_PTR pulK
Definition: pkcs11p6r.h:144
CK_SLOT_ID CK_PTR CK_SLOT_ID_PTR
Definition: pkcs11t.h:102
const CK_CHAR_PTR CK_ULONG ulMessageLen
Definition: pkcs11p6r.h:203
#define CK_DECLARE_FUNCTION(returnType, name)
Definition: pkcs11.h:115
CK_VOID_PTR pvMem
Definition: pkcs11p6r.h:178
const CK_CHAR_PTR pauclnput
Definition: pkcs11p6r.h:180
CK_CHAR_PTR pszInput
Definition: pkcs11p6r.h:182
CK_RV CK_CHAR_PTR CK_LONG * piLen
Definition: pkcs11p6r.h:172
CK_ULONG CK_OBJECT_CLASS
Definition: pkcs11t.h:303
CK_KEY_TYPE ktKeyType
Definition: pkcs11p6r.h:194
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:209
CK_ULONG ulSleepTime
Definition: pkcs11p6r.h:186
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:203
long int CK_LONG
Definition: pkcs11t.h:47
CK_OBJECT_CLASS ocClass
Definition: pkcs11p6r.h:192
CK_MECHANISM_TYPE ulMech
Definition: pkcs11p6r.h:198
const CK_CHAR_PTR CK_ULONG CK_CHAR_PTR CK_ULONG * pulResponseLen
Definition: pkcs11p6r.h:203
CK_ULONG CK_PTR CK_ULONG_PTR
Definition: pkcs11t.h:61
CK_USER_TYPE userType
Definition: pkcs11p6r.h:144
CK_ULONG CK_USER_TYPE
Definition: pkcs11t.h:258
CK_UTF8CHAR_PTR pPin
Definition: pkcs11p6r.h:87
CK_ULONG CK_RV
Definition: pkcs11t.h:1032
CK_ATTRIBUTE CK_PTR CK_ATTRIBUTE_PTR
Definition: pkcs11t.h:566
CK_UTF8CHAR CK_PTR CK_UTF8CHAR_PTR
Definition: pkcs11t.h:60