aboutsummaryrefslogtreecommitdiff
path: root/libhal.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2017-04-07 17:41:30 -0400
committerRob Austein <sra@hactrn.net>2017-04-07 17:41:30 -0400
commita031d726ccdd358cec63a7892b3ce1e88b201313 (patch)
tree2c05feeff6a78d684ffc364dde1ab76bd533d5d0 /libhal.py
parentd52a62ab76003fffd04dfaee686aa1956e7b56a7 (diff)
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.
Diffstat (limited to 'libhal.py')
-rw-r--r--libhal.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/libhal.py b/libhal.py
index 2bc80f4..5a16c40 100644
--- a/libhal.py
+++ b/libhal.py
@@ -555,8 +555,8 @@ class HSM(object):
with self.rpc(RPC_FUNC_HASH_FINALIZE, handle, length) as r:
return r.unpack_bytes()
- def pkey_load(self, type, curve, der, flags = 0, client = 0, session = 0):
- with self.rpc(RPC_FUNC_PKEY_LOAD, session, type, curve, der, flags, client = client) as r:
+ def pkey_load(self, der, flags = 0, client = 0, session = 0):
+ with self.rpc(RPC_FUNC_PKEY_LOAD, session, der, flags, client = client) as r:
pkey = PKey(self, r.unpack_uint(), UUID(bytes = r.unpack_bytes()))
logger.debug("Loaded pkey %s", pkey.uuid)
return pkey