aboutsummaryrefslogtreecommitdiff
path: root/libhal.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-11-14 18:02:07 -0500
committerRob Austein <sra@hactrn.net>2016-11-14 18:02:07 -0500
commitb448b28f538517556f3d35dee81dbf07d433df60 (patch)
tree42e9868767e80b2707d559fbcab442030a096e19 /libhal.py
parentd6e9917d07ddb0a5f8218fecdcd8bda3a1104912 (diff)
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.
Diffstat (limited to 'libhal.py')
-rw-r--r--libhal.py11
1 files changed, 0 insertions, 11 deletions
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)