[Cryptech-Commits] [sw/libhal] 02/03: Use correct RPC function code in hash_get_digest_algorithm_id().

git at cryptech.is git at cryptech.is
Wed Oct 19 06:05:40 UTC 2016


This is an automated email from the git hooks/post-receive script.

sra at hactrn.net pushed a commit to branch ksng
in repository sw/libhal.

commit c982e2e9344ab0c22f8c158cfb61da88485660d5
Author: Rob Austein <sra at hactrn.net>
AuthorDate: Wed Oct 19 01:58:27 2016 -0400

    Use correct RPC function code in hash_get_digest_algorithm_id().
---
 rpc_client.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/rpc_client.c b/rpc_client.c
index 6eaa465..e7e5567 100644
--- a/rpc_client.c
+++ b/rpc_client.c
@@ -292,13 +292,14 @@ static hal_error_t hash_get_digest_algorithm_id(const hal_digest_algorithm_t alg
   hal_client_handle_t dummy_client = {0};
   hal_error_t rpc_ret;
 
-  check(hal_xdr_encode_int(&optr, olimit, RPC_FUNC_HASH_GET_DIGEST_LEN));
+  check(hal_xdr_encode_int(&optr, olimit, RPC_FUNC_HASH_GET_DIGEST_ALGORITHM_ID));
   check(hal_xdr_encode_int(&optr, olimit, dummy_client.handle));
   check(hal_xdr_encode_int(&optr, olimit, alg));
   check(hal_xdr_encode_int(&optr, olimit, len_max));
   check(hal_rpc_send(outbuf, optr - outbuf));
 
-  check(read_matching_packet(RPC_FUNC_HASH_GET_DIGEST_LEN, inbuf, sizeof(inbuf), &iptr, &ilimit));
+  check(read_matching_packet(RPC_FUNC_HASH_GET_DIGEST_ALGORITHM_ID,
+                             inbuf, sizeof(inbuf), &iptr, &ilimit));
 
   check(hal_xdr_decode_int(&iptr, ilimit, &rpc_ret));
   if (rpc_ret == HAL_OK) {



More information about the Commits mailing list