From 015eefa32f54f84c56bb7c6d36c0edcc104a69e8 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sun, 9 Oct 2016 23:02:03 -0400 Subject: Per-session objects in ks_volatile; more untested ks_attribute code. Mostly this is another checkpoint (still passes PKCS #11 "make test"). ks_volatile.c now contains support for per-session object visibility; this may need more work to support things like a CLI view of all objects regardless of session. Adding this required minor changes to the keystore and pkey APIs, mostly because sessions are per-client. ks_volatile.c also contains an untested first cut at attribute support. Attribute support in ks_flash.c still under construction. --- hal.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'hal.h') diff --git a/hal.h b/hal.h index 997db7c..6bb2f67 100644 --- a/hal.h +++ b/hal.h @@ -148,6 +148,7 @@ DEFINE_HAL_ERROR(HAL_ERROR_KEYSTORE_BAD_BLOCK_TYPE, "Unsupported keystore block type") \ DEFINE_HAL_ERROR(HAL_ERROR_KEYSTORE_LOST_DATA, "Keystore appears to have lost data") \ DEFINE_HAL_ERROR(HAL_ERROR_BAD_ATTRIBUTE_LENGTH, "Bad attribute length") \ + DEFINE_HAL_ERROR(HAL_ERROR_ATTRIBUTE_NOT_FOUND, "Attribute not found") \ END_OF_HAL_ERROR_LIST /* Marker to forestall silly line continuation errors */ @@ -754,7 +755,8 @@ typedef struct { /* ... */ } hal_pkey_info_t; -extern hal_error_t hal_rpc_pkey_list(const hal_session_handle_t session, +extern hal_error_t hal_rpc_pkey_list(const hal_client_handle_t client, + const hal_session_handle_t session, hal_pkey_info_t *result, unsigned *result_len, const unsigned result_max, @@ -766,7 +768,8 @@ typedef struct { const uint8_t *value; } hal_rpc_pkey_attribute_t; -extern hal_error_t hal_rpc_pkey_match(const hal_session_handle_t session, +extern hal_error_t hal_rpc_pkey_match(const hal_client_handle_t client, + const hal_session_handle_t session, const hal_key_type_t type, const hal_curve_name_t curve, const hal_key_flags_t flags, -- cgit v1.2.3