summaryrefslogtreecommitdiff
path: root/src/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/session.c')
-rw-r--r--src/session.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/session.c b/src/session.c
index 51bc050..45faaa3 100644
--- a/src/session.c
+++ b/src/session.c
@@ -8,6 +8,20 @@
static const char *login_user_pin = NULL;
static const char *login_so_pin = NULL;
+
+void
+p11t_session_config(const char *name, const char *value)
+{
+ if(strcmp(name, "login-user-pin") == 0)
+ login_user_pin = value;
+ if(strcmp(name, "login-so-pin") == 0)
+ login_so_pin = value;
+}
+
+/* ----------------------------------------------------------------------------------
+ * TESTS
+ */
+
void
session_info(CK_SESSION_HANDLE session, CK_SLOT_ID slot, CK_FLAGS flags, CK_STATE state)
{
@@ -343,6 +357,10 @@ p11t_session_tests()
}
}
+/* ----------------------------------------------------------------------------------
+ * METHODS
+ */
+
CK_SESSION_HANDLE
p11t_session_open(CK_SLOT_ID slot, int readwrite)
{
@@ -442,13 +460,3 @@ p11t_session_close_all(CK_SLOT_ID slot)
return 1;
return 0;
}
-
-void
-p11t_session_config(const char *name, const char *value)
-{
- if(strcmp(name, "login-user-pin") == 0)
- login_user_pin = value;
- if(strcmp(name, "login-so-pin") == 0)
- login_so_pin = value;
-}
-