-
Notifications
You must be signed in to change notification settings - Fork 78
Closed
Description
Hello,
I'm facing this not-fixed issue due to cancelling an operation in the middle. In my specific case, I have to cancel before finishing; so I have to overcome this issue.
For encryption, I overcame this by adding an _encrypt_halt() method, which used to work fine:
# call this in OperationActive exception
def _encrypt_halt(self):
cdef CK_BYTE [:] tmp_out = CK_BYTE_buffer(8192)
cdef CK_ULONG tmp_len = 8192
# try to consume the buffer
assertRV(_funclist.C_EncryptFinal(self.session._handle,
&tmp_out[0], &tmp_len))
But I think this is a hack, not the proper way. Doing similar for sign/verify functions etc. not working; so I've decided to really fix the issue.
What is the best way of cancelling an operation? Hopefully I'll implement it.
Metadata
Metadata
Assignees
Labels
No labels