diff options
author | Stef Walter <stef@memberwebs.com> | 2008-12-06 00:32:51 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2008-12-06 00:32:51 +0000 |
commit | a4ec22d7c99f9abe749f7ac6891d24091babb764 (patch) | |
tree | e31e0d6cc7e3c3835b35fd7e28a9179808da0c49 | |
parent | 44b45c3665809a604a84da2cab8bcba56b1620c8 (diff) |
Better argument handling after running through test tool.
-rw-r--r-- | ckcapi.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); |