summaryrefslogtreecommitdiff
path: root/ckcapi-session.h
diff options
context:
space:
mode:
Diffstat (limited to 'ckcapi-session.h')
-rw-r--r--ckcapi-session.h27
1 files changed, 19 insertions, 8 deletions
diff --git a/ckcapi-session.h b/ckcapi-session.h
index 6007662..4fb68fa 100644
--- a/ckcapi-session.h
+++ b/ckcapi-session.h
@@ -22,14 +22,7 @@
#include "ckcapi.h"
-/* For operation_type in CkCapiSession */
-enum
-{
- OPERATION_NONE = 0,
- OPERATION_FIND = 1,
-};
-
-/* Callback to cancel a current operation */
+/* Callback to cleanup a current operation */
typedef void (*CkCapiSessionCancel) (struct _CkCapiSession* sess);
/* Represents an open session */
@@ -95,7 +88,25 @@ CK_RV ckcapi_session_find (CkCapiSession* sess,
CK_RV ckcapi_session_find_final (CkCapiSession* sess);
+/* Start a sign operation on a session */
+CK_RV ckcapi_session_sign_init (CkCapiSession* sess,
+ CK_MECHANISM_PTR mech,
+ CkCapiObjectData *objdata);
+
+/* Perform sign operation */
+CK_RV ckcapi_session_sign (CkCapiSession* sess,
+ CK_BYTE_PTR data, CK_ULONG n_data,
+ CK_BYTE_PTR sig, CK_ULONG_PTR n_sig);
+
+/* Start a decrypt operation on a session */
+CK_RV ckcapi_session_decrypt_init (CkCapiSession* sess,
+ CK_MECHANISM_PTR mech,
+ CkCapiObjectData *objdata);
+/* Perform decrypt operation */
+CK_RV ckcapi_session_decrypt (CkCapiSession* sess,
+ CK_BYTE_PTR encdata, CK_ULONG n_encdata,
+ CK_BYTE_PTR result, CK_ULONG_PTR n_result);
/* Get object data for an object */
CK_RV ckcapi_session_get_object_data (CkCapiSession* sess,