1SUNW_C_GetMechSession(3EXT)Extended Library FunctionsSUNW_C_GetMechSession(3EXT)
2
3
4
6 SUNW_C_GetMechSession, SUNW_C_KeyToObject - PKCS#11 Cryptographic
7 Framework functions
8
10 cc [ flag ... ] file... -lpkcs11 [ library... ]
11 #include <security/cryptoki.h>
12 #include <security/pkcs11.h>
13
14 CK_RV SUNW_C_GetMechSession(CK_MECHANISM_TYPE mech,
15 CK_SESSION_HANDLE_PTR hSession);
16
17
18 CK_RV SUNW_C_KeyToObject(CK_SESSION_HANDLE hSession,
19 CK_MECHANISM_TYPE mech, const void *rawkey, size_t rawkey_len,
20 CK_OBJECT_HANDLE_PTR obj);
21
22
24 These functions implement the RSA PKCS#11 v2.20 specification by using
25 plug-ins to provide the slots.
26
27
28 The SUNW_C_GetMechSession() function initializes the PKCS#11 crypto‐
29 graphic framework and performs all necessary calls to Standard PKCS#11
30 functions (see libpkcs11(3LIB)) to create a session capable of provid‐
31 ing operations on the requested mechanism. It is not neccessary to call
32 C_Initalize() or C_GetSlotList() before the first call to SUNW_C_Get‐
33 MechSession().
34
35
36 If the SUNW_C_GetMechSession() function is called multiple times, it
37 will return a new session each time without re-initalizing the frame‐
38 work. If it is unable to return a new session, CKR_SESSION_COUNT is
39 returned.
40
41
42 The C_CloseSession() function should be called to release the session
43 when it is no longer required.
44
45
46 The SUNW_C_KeyToObject() function creates a key object for the speci‐
47 fied mechanism from the rawkey data. The object should be destroyed
48 with C_DestroyObject() when it is no longer required.
49
51 The SUNW_C_GetMechSession() function returns the following values:
52
53 CKR_OK The function completed successfully.
54
55
56 CKR_SESSION_COUNT No sessions are available.
57
58
59 CKR_ARGUMENTS_BAD A null pointer was passed for the return ses‐
60 sion handle.
61
62
63 CKR_MECHANISM_INVALID The requested mechanism is invalid or no
64 available plug-in provider supports it.
65
66
67 CKR_FUNCTION_FAILED The function failed.
68
69
70 CKR_GENERAL_ERROR A general error occurred.
71
72
73
74 The SUNW_C_KeyToObject() function returns the following values:
75
76 CKR_OK The function completed successfully.
77
78
79 CKR_ARGUMENTS_BAD A null pointer was passed for the session han‐
80 dle or the key material.
81
82
83 CKR_MECHANISM_INVALID The requested mechanism is invalid or no
84 available plug-in provider supports it.
85
86
87 CKR_FUNCTION_FAILED The function failed.
88
89
90 CKR_GENERAL_ERROR A general error occurred.
91
92
93
94 The return values of each of the implemented functions are defined and
95 listed in the RSA PKCS#11 v2.20 specification. See http://www.rsasecu‐
96 rity.com.
97
99 These functions are not part of the RSA PKCS#11 v2.20 specification.
100 They are not likely to exist on non-Solaris systems. They are provided
101 as a convenience to application programmers. Use of these functions
102 will make the application non-portable to other systems.
103
105 See attributes(5) for descriptions of the following attributes:
106
107
108
109
110 ┌─────────────────────────────┬─────────────────────────────┐
111 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
112 ├─────────────────────────────┼─────────────────────────────┤
113 │Interface Stability │Evolving │
114 ├─────────────────────────────┼─────────────────────────────┤
115 │MT-Level │MT-Safe │
116 └─────────────────────────────┴─────────────────────────────┘
117
119 libpkcs11(3LIB), attributes(5)
120
121
122 http://www.rsasecurity.com
123
124
125
126SunOS 5.11 27 Oct 2005 SUNW_C_GetMechSession(3EXT)