From 0bd1d5a0f3115c950bcb342788760081f8b8cf98 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sat, 5 Nov 2016 21:49:16 -0400 Subject: Debug most recent changes to C client RPC API. --- rpc_client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rpc_client.c') diff --git a/rpc_client.c b/rpc_client.c index 2df30b1..0bd3ed5 100644 --- a/rpc_client.c +++ b/rpc_client.c @@ -635,7 +635,7 @@ static hal_error_t pkey_remote_get_key_curve(const hal_pkey_handle_t pkey, check(hal_xdr_decode_int(&iptr, ilimit, &rpc_ret)); if (rpc_ret == HAL_OK) { - check(hal_xdr_decode_int(&iptr, ilimit, &type32)); + check(hal_xdr_decode_int(&iptr, ilimit, &curve32)); *curve = (hal_curve_name_t)curve32; } return rpc_ret; @@ -840,9 +840,9 @@ static hal_error_t pkey_remote_match(const hal_client_handle_t client, size_t attributes_buffer_len = 0; if (attributes != NULL) for (int i = 0; i < attributes_len; i++) - attributes_buffer_len += attributes[i].length; + attributes_buffer_len += pad(attributes[i].length); - uint8_t outbuf[nargs(9 + attributes_len * 2) + pad(attributes_buffer_len) + pad(sizeof(hal_uuid_t))]; + uint8_t outbuf[nargs(9 + attributes_len * 2) + attributes_buffer_len + pad(sizeof(hal_uuid_t))]; uint8_t *optr = outbuf, *olimit = outbuf + sizeof(outbuf); uint8_t inbuf[nargs(4) + pad(result_max * sizeof(hal_uuid_t))]; const uint8_t *iptr = inbuf, *ilimit = inbuf + sizeof(inbuf); -- cgit v1.2.3