summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ckcapi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ckcapi.c b/ckcapi.c
index b032c13..b0967a6 100644
--- a/ckcapi.c
+++ b/ckcapi.c
@@ -312,6 +312,7 @@ CC_C_Finalize(CK_VOID_PTR pReserved)
{
ENTER(C_Finalize);
PREREQ(cryptoki_initialized, CKR_CRYPTOKI_NOT_INITIALIZED);
+ PREREQ(!pReserved, CKR_ARGUMENTS_BAD);
cryptoki_initialized = 0;
@@ -552,6 +553,8 @@ CC_C_OpenSession(CK_SLOT_ID id, CK_FLAGS flags, CK_VOID_PTR application,
ENTER(C_OpenSession);
PREREQ(cryptoki_initialized, CKR_CRYPTOKI_NOT_INITIALIZED);
+ PREREQ(session, CKR_ARGUMENTS_BAD);
+ PREREQ(flags & CKF_SERIAL_SESSION, CKR_SESSION_PARALLEL_NOT_SUPPORTED);
if(!ckcapi_token_is_valid(id))
RETURN(CKR_SLOT_ID_INVALID);
@@ -632,6 +635,7 @@ CC_C_GetSessionInfo(CK_SESSION_HANDLE session, CK_SESSION_INFO_PTR info)
{
ENTER(C_GetSessionInfo);
PREREQ(cryptoki_initialized, CKR_CRYPTOKI_NOT_INITIALIZED);
+ PREREQ(info, CKR_ARGUMENTS_BAD);
// TODO: Implement
RETURN(CKR_FUNCTION_NOT_SUPPORTED);