From b448b28f538517556f3d35dee81dbf07d433df60 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Mon, 14 Nov 2016 18:02:07 -0500 Subject: More API cleanup: remove hal_rpc_pkey_list(). hal_rpc_pkey_list() was a simplistic solution that worked when the keystore only supported a handful of keys and we needed a quick temporary solution in time for a workshop. It doesn't handle large numbers of keys well, and while we could fix that, all of its functionality is now available via more robust API functions, so simplifying the API by deleting it seems best. Since this change required mucking with dispatch vectors yet again, it converts them to use C99 "designated initializer" syntax. --- libhal.py | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'libhal.py') diff --git a/libhal.py b/libhal.py index bd345a8..8dad622 100644 --- a/libhal.py +++ b/libhal.py @@ -178,7 +178,6 @@ RPCFunc.define(''' RPC_FUNC_PKEY_GET_PUBLIC_KEY, RPC_FUNC_PKEY_SIGN, RPC_FUNC_PKEY_VERIFY, - RPC_FUNC_PKEY_LIST, RPC_FUNC_PKEY_MATCH, RPC_FUNC_PKEY_GET_KEY_CURVE, RPC_FUNC_PKEY_SET_ATTRIBUTES, @@ -629,16 +628,6 @@ class HSM(object): with self.rpc(RPC_FUNC_PKEY_VERIFY, pkey, hash, data, signature): return - def pkey_list(self, flags = 0, client = 0, session = 0, length = 512): - with self.rpc(RPC_FUNC_PKEY_LIST, session, length, flags, client = client) as r: - n = r.unpack_uint() - for i in xrange(n): - key_type = HALKeyType.index[r.unpack_uint()] - key_curve = HALCurve.index[r.unpack_uint()] - key_flags = r.unpack_uint() - key_name = UUID(bytes = r.unpack_bytes()) - yield key_type, key_curve, key_flags, key_name - def pkey_match(self, type = 0, curve = 0, flags = 0, attributes = {}, length = 64, client = 0, session = 0): u = UUID(int = 0) -- cgit v1.2.3