Skip to content

Commit 09e363d

Browse files
Implement operation management generically
Covers search, encryption/decryption, and sign/verify.
1 parent 0c5cced commit 09e363d

File tree

6 files changed

+653
-411
lines changed

6 files changed

+653
-411
lines changed

pkcs11/_pkcs11.pxd

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ cdef extern from '../extern/cryptoki.h':
139139

140140
CKR_FUNCTION_REJECTED,
141141

142+
CKR_OPERATION_CANCEL_FAILED,
143+
142144
CKR_VENDOR_DEFINED,
143145

144146

@@ -590,6 +592,28 @@ cdef extern from '../extern/cryptoki.h':
590592
# All other APIs are taken from the CK_FUNCTION_LIST table
591593
ctypedef CK_RV (*C_GetFunctionList_ptr) (CK_FUNCTION_LIST **) nogil
592594

595+
ctypedef CK_RV (*KeyOperationInit) (
596+
CK_SESSION_HANDLE session,
597+
CK_MECHANISM *mechanism,
598+
CK_OBJECT_HANDLE key
599+
) nogil
600+
ctypedef CK_RV (*OperationUpdateWithResult) (
601+
CK_SESSION_HANDLE session,
602+
CK_BYTE *part_in,
603+
CK_ULONG part_in_len,
604+
CK_BYTE *part_out,
605+
CK_ULONG *part_out_len
606+
) nogil
607+
ctypedef CK_RV (*OperationUpdate) (
608+
CK_SESSION_HANDLE session,
609+
CK_BYTE *part_in,
610+
CK_ULONG part_in_len
611+
) nogil
612+
ctypedef CK_RV (*OperationWithResult) (
613+
CK_SESSION_HANDLE session,
614+
CK_BYTE *part_out,
615+
CK_ULONG *part_out_len
616+
) nogil
593617

594618
cdef inline CK_BYTE_buffer(length):
595619
"""Make a buffer for `length` CK_BYTEs."""

0 commit comments

Comments
 (0)