aboutsummaryrefslogtreecommitdiff
path: root/rpc_client.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_client.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_client.c')
-rw-r--r--rpc_client.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/rpc_client.c b/rpc_client.c
index 14ef23b..b4184d4 100644
--- a/rpc_client.c
+++ b/rpc_client.c
@@ -447,11 +447,10 @@ static hal_error_t pkey_remote_load(const hal_client_handle_t client,
static hal_error_t pkey_remote_find(const hal_client_handle_t client,
const hal_session_handle_t session,
hal_pkey_handle_t *pkey,
- const hal_key_type_t type,
const hal_uuid_t * const name,
const hal_key_flags_t flags)
{
- uint8_t outbuf[nargs(6) + pad(sizeof(name->uuid))], *optr = outbuf, *olimit = outbuf + sizeof(outbuf);
+ uint8_t outbuf[nargs(5) + pad(sizeof(name->uuid))], *optr = outbuf, *olimit = outbuf + sizeof(outbuf);
uint8_t inbuf[nargs(4)];
const uint8_t *iptr = inbuf, *ilimit = inbuf + sizeof(inbuf);
hal_error_t rpc_ret;
@@ -459,7 +458,6 @@ static hal_error_t pkey_remote_find(const hal_client_handle_t client,
check(hal_xdr_encode_int(&optr, olimit, RPC_FUNC_PKEY_FIND));
check(hal_xdr_encode_int(&optr, olimit, client.handle));
check(hal_xdr_encode_int(&optr, olimit, session.handle));
- check(hal_xdr_encode_int(&optr, olimit, type));
check(hal_xdr_encode_buffer(&optr, olimit, name->uuid, sizeof(name->uuid)));
check(hal_xdr_encode_int(&optr, olimit, flags));
check(hal_rpc_send(outbuf, optr - outbuf));