index.rst (1891B)
1 .. _mozilla_projects_nss_reference_fc_getsessioninfo: 2 3 FC_GetSessionInfo 4 ================= 5 6 `Name <#name>`__ 7 ~~~~~~~~~~~~~~~~ 8 9 .. container:: 10 11 FC_GetSessionInfo - obtain information about a session. 12 13 `Syntax <#syntax>`__ 14 ~~~~~~~~~~~~~~~~~~~~ 15 16 .. container:: 17 18 .. code:: 19 20 CK_RV FC_GetSessionInfo( 21 CK_SESSION_HANDLE hSession, 22 CK_SESSION_INFO_PTR pInfo 23 ); 24 25 `Parameters <#parameters>`__ 26 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 27 28 .. container:: 29 30 ``hSession`` 31 [in] the open session handle. 32 ``pInfo`` 33 [out] pointer to the `CK_SESSION_INFO </en-US/CK_SESSION_INFO>`__ structure to be returned. 34 35 `Description <#description>`__ 36 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 37 38 .. container:: 39 40 ``FC_GetSessionInfo`` obtains information about a session. A user may call ``FC_GetSessionInfo`` 41 without logging into the token (to assume the NSS User role). 42 43 If the NSS cryptographic module is in the error state, ``FC_GetSessionInfo`` returns 44 ``CKR_DEVICE_ERROR``. Otherwise, it fills in the ``CK_SESSION_INFO`` structure with the following 45 information: 46 47 - ``state``: the state of the session, i.e., no role is assumed, the User role is assumed, or 48 the Crypto Officer role is assumed 49 - ``flags``: bit flags that define the type of session 50 51 - ``CKF_RW_SESSION (0x00000002)``: true if the session is read/write; false if the session is 52 read-only. 53 - ``CKF_SERIAL_SESSION (0x00000004)``: this flag is provided for backward compatibility and 54 is always set to true. 55 56 .. _return_value: 57 58 `Return value <#return_value>`__ 59 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 60 61 .. container:: 62 63 `Examples <#examples>`__ 64 ~~~~~~~~~~~~~~~~~~~~~~~~ 65 66 .. container:: 67 68 .. _see_also: 69 70 `See also <#see_also>`__ 71 ~~~~~~~~~~~~~~~~~~~~~~~~ 72 73 .. container:: 74 75 - :ref:`mozilla_projects_nss_reference_fc_closesession`, 76 `NSC_OpenSession </en-US/NSC_OpenSession>`__