diff options
author | Rob Austein <sra@hactrn.net> | 2016-11-05 21:49:16 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-11-05 21:49:16 -0400 |
commit | 0bd1d5a0f3115c950bcb342788760081f8b8cf98 (patch) | |
tree | d0f05363dde5a547154a4718c7686917e29f91db | |
parent | 86701154b036ff0d3ab2e7733d3dfaecd1f7b87a (diff) |
Debug most recent changes to C client RPC API.
-rw-r--r-- | rpc_client.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |