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: */
20 #define CKF_P6R_LOGGINGON 0x80000000UL
21 
22 
23 /* [B] The following P6R vendor attribute types are defined: */
24 
25 /* CKA_P6R_GROUP
26  Purpose: to allow PKCS 11 objects to be placed into collections
27  Data Type: RFC 2279 string
28  MUST be specified when object is created with C_CreateObject.
29  MUST be specified when object is created with C_GenerateKey or C_GenerateKeyPair.
30  */
31 #define CKA_P6R_GROUP 0x80001000UL
32 
33 /* CKA_P6R_EXT1
34  Purpose: to allow a user to associate whatever data they want to an object
35  Data Type: Byte Array
36  Can be created and modified at any time
37  */
38 #define CKA_P6R_EXT1 0x80001002UL
39 
40 
41 /* [C] The following P6R vendor tyes are defined: */
42 typedef struct {
45 
46 typedef struct {
47  CK_UTF8CHAR_PTR pFQDN; // -> KMIP server host name
48  CK_ULONG ulFQDNLen; // -> length in bytes of the server host name */
49  CK_ULONG port; // -> KMIP server port
50  CK_ULONG useFlags; // -> KMIP client behavior flags
51  CK_VOID_PTR pCredentials; // -> actually a P6KMIP_CREDENTIAL*, if the KMIP client certificate is not enough to authenticate the KMIP user //
52  CK_UTF8CHAR_PTR pDefaultGroup; // -> KMIP default group
53  CK_ULONG ulGroupLen; // -> length in bytes of the group name
55 
56 /* P6R_VENDOR_SLOT_INFO
57  *
58  * type - indicates which union element is used {1..}, 0 means no value set
59  */
60 typedef struct {
62  union {
63  P6R_SLOT_INFO p6r_slot; // -> entry type == 1
64  } slot;
66 
67 /* P6R_VENDOR_TOKEN_INFO
68  *
69  * type - indicates which union element is used {1..}, 0 means no value set
70  */
71 typedef struct {
73  union {
74  P6R_KMIP_TOKEN_INFO p6r_kmip; // -> entry type == 1
75  } token;
77 
78 
79 /* [D] The following P6R vendor methods are defined: */
80 
81 /* P6R_DestroyToken frees all contents in the token and disables its containing slot */
96 extern CK_DECLARE_FUNCTION(CK_RV, P6R_DestroyToken)
97 (
98  CK_SLOT_ID slotID, /* input: ID of the token's slot */
99  CK_UTF8CHAR_PTR pPin, /* input: the SO's initial PIN */
100  CK_ULONG ulPinLen /* input: length in bytes of the PIN */
101 );
102 
103 
116 extern CK_DECLARE_FUNCTION(CK_RV, P6R_CreateSlot)
117 (
118  CK_SLOT_INFO_PTR pInfo, /* input: standard PKCS11 properties of the slot to be created */
119  P6R_VENDOR_SLOT_INFO* pExtension, /* input: extension properties for a vendor slot to be created */
120  CK_SLOT_ID_PTR pSlotId /* output: the identifier value assigned to the new slot */
121 );
122 
123 
137 extern CK_DECLARE_FUNCTION(CK_RV, P6R_CreateToken)
138 (
139  CK_SLOT_ID slotID, /* input: the identifier value returned by a call to P6R_CreateSlot() */
140  CK_TOKEN_INFO_PTR pTokenInfo, /* input: standard PKCS11 properties of the token to be created */
141  P6R_VENDOR_TOKEN_INFO* pExtension /* input: extension properties for a vendor token to be created */
142 );
143 
144 
145 #ifdef __cplusplus
146 }
147 #endif
148 
149 #endif
CK_TOKEN_INFO_PTR pTokenInfo
Definition: pkcs11p6r.h:140
CK_ULONG ulFQDNLen
Definition: pkcs11p6r.h:48
CK_UTF8CHAR_PTR pPin
Definition: pkcs11p6r.h:99
CK_VOID_PTR pCredentials
Definition: pkcs11p6r.h:51
unsigned long int CK_ULONG
Definition: pkcs11t.h:44
CK_TOKEN_INFO CK_PTR CK_TOKEN_INFO_PTR
Definition: pkcs11t.h:245
CK_UTF8CHAR_PTR CK_ULONG ulPinLen
Definition: pkcs11p6r.h:99
void CK_PTR CK_VOID_PTR
Definition: pkcs11t.h:62
P6R_KMIP_TOKEN_INFO p6r_kmip
Definition: pkcs11p6r.h:74
CK_ULONG CK_SLOT_ID
Definition: pkcs11t.h:102
CK_ULONG useFlags
Definition: pkcs11p6r.h:50
CK_SLOT_ID CK_PTR CK_SLOT_ID_PTR
Definition: pkcs11t.h:104
CK_ULONG none
Definition: pkcs11p6r.h:43
#define CK_DECLARE_FUNCTION(returnType, name)
Definition: pkcs11.h:164
CK_ULONG ulGroupLen
Definition: pkcs11p6r.h:53
P6R_SLOT_INFO p6r_slot
Definition: pkcs11p6r.h:63
CK_UTF8CHAR_PTR pDefaultGroup
Definition: pkcs11p6r.h:52
CK_UTF8CHAR_PTR pFQDN
Definition: pkcs11p6r.h:47
CK_SLOT_INFO CK_PTR CK_SLOT_INFO_PTR
Definition: pkcs11t.h:126
P6R_VENDOR_SLOT_INFO * pExtension
Definition: pkcs11p6r.h:119
P6R_VENDOR_SLOT_INFO CK_SLOT_ID_PTR pSlotId
Definition: pkcs11p6r.h:119
CK_ULONG CK_RV
Definition: pkcs11t.h:1038
CK_UTF8CHAR CK_PTR CK_UTF8CHAR_PTR
Definition: pkcs11t.h:60