aboutsummaryrefslogtreecommitdiff
path: root/xdr_internal.h
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2019-04-02 00:58:41 -0400
committerPaul Selkirk <paul@psgd.org>2019-04-02 00:58:41 -0400
commit6b0c67ace3678325443aa21a32b2b10daa018e27 (patch)
tree65d49218a1c57ca67aff2859a4e5a4530b7daeaa /xdr_internal.h
parent5e420cb84a401a04557d63a60d30f42699270509 (diff)
Small cleanups in RPC code, e.g. to support null arguments.
- Add support for null pointer arguments in RPCs for get_digest_algorithm_id and get_public_key. This is years overdue, and would have obviated the need for get_public_key_len as a separate RPC. - Refactor pkey_local_get_public_key_len in terms of pkey_local_get_public_key. - Add more parameter sanity checks to rpc_api.c. - Add a len_max parameter to hal_xdr_decode_variable_opaque, rather than having len be an in/out parameter. This brings xdr slightly more in line with the rest of the code base (again after literal years), and slightly simplifies several calls in rpc_client.c.
Diffstat (limited to 'xdr_internal.h')
-rw-r--r--xdr_internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/xdr_internal.h b/xdr_internal.h
index aa3a1e9..6cdc064 100644
--- a/xdr_internal.h
+++ b/xdr_internal.h
@@ -68,7 +68,7 @@ hal_error_t hal_xdr_encode_variable_opaque(uint8_t ** const outbuf,
hal_error_t hal_xdr_decode_variable_opaque(const uint8_t ** const inbuf,
const uint8_t * const limit,
uint8_t * const value,
- size_t * const len);
+ size_t * const len, const size_t len_max);
hal_error_t hal_xdr_decode_variable_opaque_ptr(const uint8_t ** const inbuf,
const uint8_t * const limit,