From a031d726ccdd358cec63a7892b3ce1e88b201313 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Fri, 7 Apr 2017 17:41:30 -0400 Subject: Pull key type information from uploaded key in hal_rpc_pkey_load(). Now that we use PKCS #8 format for private keys, all key formats we use include ASN.1 AlgorithmIdentifier field describing the key, so specifying key type and curve as arguments to hal_rpc_pkey_load() is neither necessary nor particularly useful. --- rpc_client.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'rpc_client.c') diff --git a/rpc_client.c b/rpc_client.c index 5729b6f..e856cce 100644 --- a/rpc_client.c +++ b/rpc_client.c @@ -420,13 +420,11 @@ static hal_error_t hash_finalize(const hal_hash_handle_t hash, static hal_error_t pkey_remote_load(const hal_client_handle_t client, const hal_session_handle_t session, hal_pkey_handle_t *pkey, - const hal_key_type_t type, - const hal_curve_name_t curve, hal_uuid_t *name, const uint8_t * const der, const size_t der_len, const hal_key_flags_t flags) { - uint8_t outbuf[nargs(7) + pad(der_len)], *optr = outbuf, *olimit = outbuf + sizeof(outbuf); + uint8_t outbuf[nargs(5) + pad(der_len)], *optr = outbuf, *olimit = outbuf + sizeof(outbuf); uint8_t inbuf[nargs(5) + pad(sizeof(name->uuid))]; const uint8_t *iptr = inbuf, *ilimit = inbuf + sizeof(inbuf); uint32_t name_len = sizeof(name->uuid); @@ -435,8 +433,6 @@ static hal_error_t pkey_remote_load(const hal_client_handle_t client, check(hal_xdr_encode_int(&optr, olimit, RPC_FUNC_PKEY_LOAD)); check(hal_xdr_encode_int(&optr, olimit, client.handle)); check(hal_xdr_encode_int(&optr, olimit, session.handle)); - check(hal_xdr_encode_int(&optr, olimit, type)); - check(hal_xdr_encode_int(&optr, olimit, curve)); check(hal_xdr_encode_buffer(&optr, olimit, der, der_len)); check(hal_xdr_encode_int(&optr, olimit, flags)); check(hal_rpc_send(outbuf, optr - outbuf)); -- cgit v1.2.3