aboutsummaryrefslogtreecommitdiff
path: root/rpc_server.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-05-14 02:59:32 -0400
committerRob Austein <sra@hactrn.net>2016-05-14 02:59:32 -0400
commit598e75956634f33ede687da796d5b6c583048a5e (patch)
treea62d1c9dbe2ea1d559be3d7ec80fb4d6a4f3e193 /rpc_server.c
parenta0d2fb9dd44af6315f4373956655bb665f86b774 (diff)
Add mixed-mode key support, for PKCS #11 "session" (ie, not "token") keys.
Diffstat (limited to 'rpc_server.c')
-rw-r--r--rpc_server.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/rpc_server.c b/rpc_server.c
index 65f3dfc..d64603c 100644
--- a/rpc_server.c
+++ b/rpc_server.c
@@ -320,15 +320,17 @@ static hal_error_t pkey_find(uint8_t **iptr, const uint8_t * const ilimit,
uint32_t type;
uint8_t *name;
uint32_t name_len;
+ hal_key_flags_t flags;
hal_error_t ret;
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, &name_len));
+ check(hal_xdr_decode_int(iptr, ilimit, &flags));
/* call the local function */
- ret = hal_rpc_local_pkey_dispatch.find(client, session, &pkey, type, name, name_len);
+ ret = hal_rpc_local_pkey_dispatch.find(client, session, &pkey, type, name, name_len, flags);
if (ret == HAL_OK)
check(hal_xdr_encode_int(optr, olimit, pkey.handle));
return ret;
@@ -567,15 +569,17 @@ static hal_error_t pkey_list(uint8_t **iptr, const uint8_t * const ilimit,
{
uint8_t *optr_orig = *optr;
uint32_t result_max;
+ hal_key_flags_t flags;
hal_error_t ret;
check(hal_xdr_decode_int(iptr, ilimit, &result_max));
+ check(hal_xdr_decode_int(iptr, ilimit, &flags));
hal_pkey_info_t result[result_max];
unsigned result_len;
/* call the local function */
- ret = hal_rpc_local_pkey_dispatch.list(result, &result_len, result_max);
+ ret = hal_rpc_local_pkey_dispatch.list(result, &result_len, result_max, flags);
if (ret == HAL_OK) {
int i;
check(hal_xdr_encode_int(optr, olimit, result_len));