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. --- libhal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libhal.py') 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 -- cgit v1.2.3