aboutsummaryrefslogtreecommitdiff
path: root/hal_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'hal_internal.h')
-rw-r--r--hal_internal.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/hal_internal.h b/hal_internal.h
index 0d40922..fe1cb1f 100644
--- a/hal_internal.h
+++ b/hal_internal.h
@@ -225,24 +225,24 @@ typedef struct {
hal_error_t (*get_public_key)(const hal_pkey_handle_t pkey,
uint8_t *der, size_t *der_len, const size_t der_max);
- hal_error_t (*sign)(const hal_session_handle_t session,
- const hal_pkey_handle_t pkey,
+ hal_error_t (*sign)(const hal_pkey_handle_t pkey,
const hal_hash_handle_t hash,
const uint8_t * const input, const size_t input_len,
uint8_t * signature, size_t *signature_len, const size_t signature_max);
- hal_error_t (*verify)(const hal_session_handle_t session,
- const hal_pkey_handle_t pkey,
+ hal_error_t (*verify)(const hal_pkey_handle_t pkey,
const hal_hash_handle_t hash,
const uint8_t * const input, const size_t input_len,
const uint8_t * const signature, const size_t signature_len);
- hal_error_t (*list)(hal_pkey_info_t *result,
+ hal_error_t (*list)(const hal_session_handle_t session,
+ hal_pkey_info_t *result,
unsigned *result_len,
const unsigned result_max,
hal_key_flags_t flags);
- hal_error_t (*match)(const hal_key_type_t type,
+ hal_error_t (*match)(const hal_session_handle_t session,
+ const hal_key_type_t type,
const hal_curve_name_t curve,
const hal_key_flags_t flags,
hal_rpc_pkey_attribute_t *attributes,
@@ -491,11 +491,13 @@ struct hal_ks_driver {
const hal_pkey_slot_t * const slot);
hal_error_t (*list)(hal_ks_t *ks,
+ const hal_session_handle_t session,
hal_pkey_info_t *result,
unsigned *result_len,
const unsigned result_max);
hal_error_t (*match)(hal_ks_t *ks,
+ const hal_session_handle_t session,
const hal_key_type_t type,
const hal_curve_name_t curve,
const hal_key_flags_t flags,
@@ -606,6 +608,7 @@ static inline hal_error_t hal_ks_delete(hal_ks_t *ks,
}
static inline hal_error_t hal_ks_list(hal_ks_t *ks,
+ const hal_session_handle_t session,
hal_pkey_info_t *result,
unsigned *result_len,
const unsigned result_max)
@@ -613,10 +616,11 @@ static inline hal_error_t hal_ks_list(hal_ks_t *ks,
if (ks == NULL || ks->driver == NULL || ks->driver->list == NULL)
return HAL_ERROR_BAD_ARGUMENTS;
- return ks->driver->list(ks, result, result_len, result_max);
+ return ks->driver->list(ks, session, result, result_len, result_max);
}
static inline hal_error_t hal_ks_match(hal_ks_t *ks,
+ const hal_session_handle_t session,
const hal_key_type_t type,
const hal_curve_name_t curve,
const hal_key_flags_t flags,
@@ -630,7 +634,7 @@ static inline hal_error_t hal_ks_match(hal_ks_t *ks,
if (ks == NULL || ks->driver == NULL || ks->driver->match == NULL)
return HAL_ERROR_BAD_ARGUMENTS;
- return ks->driver->match(ks, type, curve, flags, attributes, attributes_len,
+ return ks->driver->match(ks, session, type, curve, flags, attributes, attributes_len,
result, result_len, result_max, previous_uuid);
}