aboutsummaryrefslogtreecommitdiff
path: root/rpc_server.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-09-09 00:33:52 -0400
committerRob Austein <sra@hactrn.net>2016-09-09 00:33:52 -0400
commitb1214089088d0321142f64abf2c820da9561bba9 (patch)
tree05a86d0c7ab9339a2102e8328f13fadd9a31330a /rpc_server.c
parent97ee7df6092551774b4c112a0349a25e76a684f3 (diff)
Simplify hal_rpc_pkey_find() by removing `type` argument.
Now that key names are UUIDs generated by the HSM, there's no real need to specify type key type when looking up a key, and removing the `type` argument allows a few simplifications of both the internal keystore API and of client code calling the public RPC API.
Diffstat (limited to 'rpc_server.c')
-rw-r--r--rpc_server.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/rpc_server.c b/rpc_server.c
index 9694ab8..9397d3e 100644
--- a/rpc_server.c
+++ b/rpc_server.c
@@ -354,7 +354,6 @@ static hal_error_t pkey_find(const uint8_t **iptr, const uint8_t * const ilimit,
hal_client_handle_t client;
hal_session_handle_t session;
hal_pkey_handle_t pkey;
- uint32_t type;
const uint8_t *name_ptr;
uint32_t name_len;
hal_key_flags_t flags;
@@ -362,7 +361,6 @@ static hal_error_t pkey_find(const uint8_t **iptr, const uint8_t * const ilimit,
check(hal_xdr_decode_int(iptr, ilimit, &client.handle));
check(hal_xdr_decode_int(iptr, ilimit, &session.handle));
- check(hal_xdr_decode_int(iptr, ilimit, &type));
check(hal_xdr_decode_buffer_in_place(iptr, ilimit, &name_ptr, &name_len));
check(hal_xdr_decode_int(iptr, ilimit, &flags));
@@ -370,7 +368,7 @@ static hal_error_t pkey_find(const uint8_t **iptr, const uint8_t * const ilimit,
return HAL_ERROR_KEY_NAME_TOO_LONG;
/* call the local function */
- ret = hal_rpc_local_pkey_dispatch.find(client, session, &pkey, type, (const hal_uuid_t *) name_ptr, flags);
+ ret = hal_rpc_local_pkey_dispatch.find(client, session, &pkey, (const hal_uuid_t *) name_ptr, flags);
if (ret == HAL_OK)
check(hal_xdr_encode_int(optr, olimit, pkey.handle));