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. --- rpc_api.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'rpc_api.c') diff --git a/rpc_api.c b/rpc_api.c index f7b04cc..3ff814a 100644 --- a/rpc_api.c +++ b/rpc_api.c @@ -326,7 +326,8 @@ hal_error_t hal_rpc_pkey_verify(const hal_pkey_handle_t pkey, return hal_rpc_pkey_dispatch->verify(pkey, hash, input, input_len, signature, signature_len); } -hal_error_t hal_rpc_pkey_list(const hal_session_handle_t session, +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, @@ -334,10 +335,11 @@ hal_error_t hal_rpc_pkey_list(const hal_session_handle_t session, { if (result == NULL || result_len == NULL || result_max == 0) return HAL_ERROR_BAD_ARGUMENTS; - return hal_rpc_pkey_dispatch->list(session, result, result_len, result_max, flags); + return hal_rpc_pkey_dispatch->list(client, session, result, result_len, result_max, flags); } -hal_error_t hal_rpc_pkey_match(const hal_session_handle_t session, +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, @@ -357,7 +359,8 @@ hal_error_t hal_rpc_pkey_match(const hal_session_handle_t session, if (attributes[i].value == NULL) return HAL_ERROR_BAD_ARGUMENTS; - return hal_rpc_pkey_dispatch->match(session, type, curve, flags, attributes, attributes_len, + return hal_rpc_pkey_dispatch->match(client, session, type, curve, flags, + attributes, attributes_len, result, result_len, result_max, previous_uuid); } -- cgit v1.2.3