aboutsummaryrefslogtreecommitdiff
path: root/cryptech/libhal.py
diff options
context:
space:
mode:
Diffstat (limited to 'cryptech/libhal.py')
-rw-r--r--cryptech/libhal.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/cryptech/libhal.py b/cryptech/libhal.py
index 1e2dbc6..102e663 100644
--- a/cryptech/libhal.py
+++ b/cryptech/libhal.py
@@ -698,13 +698,14 @@ class HSM(object):
n = length
s = 0
while n == length:
- with self.rpc(RPC_FUNC_PKEY_MATCH, session, type, curve, mask, flags,
- attributes, s, length, u, client = client) as r:
- s = r.unpack_uint()
- n = r.unpack_uint()
- for i in range(n):
- u = UUID(bytes = r.unpack_bytes())
- yield u
+ r = self.rpc(RPC_FUNC_PKEY_MATCH, session, type, curve, mask, flags,
+ attributes, s, length, u, client = client)
+ s = r.unpack_uint()
+ n = r.unpack_uint()
+ for i in range(n):
+ u = UUID(bytes = r.unpack_bytes())
+ yield u
+ r.done()
def pkey_set_attributes(self, pkey, attributes):
with self.rpc(RPC_FUNC_PKEY_SET_ATTRIBUTES, pkey, attributes):