aboutsummaryrefslogtreecommitdiff
path: root/key-backup.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 /key-backup.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 'key-backup.py')
-rw-r--r--key-backup.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/key-backup.py b/key-backup.py
index 3d971e7..4cdd9e9 100644
--- a/key-backup.py
+++ b/key-backup.py
@@ -70,8 +70,6 @@ def test_export():
kekek = RSA.importKey(kekek_pem)
kekek_handle = hsm.pkey_load(
- type = HAL_KEY_TYPE_RSA_PUBLIC,
- curve = HAL_CURVE_NONE,
flags = HAL_KEY_FLAG_USAGE_KEYENCIPHERMENT,
der = kekek.publickey().exportKey(format = "DER"))
atexit(kekek_handle.delete)
@@ -102,8 +100,6 @@ def test_import():
if False:
kekek = RSA.importKey(kekek_pem)
kekek_handle = hsm.pkey_load(
- type = HAL_KEY_TYPE_RSA_PRIVATE,
- curve = HAL_CURVE_NONE,
flags = HAL_KEY_FLAG_USAGE_KEYENCIPHERMENT,
der = kekek.exportKey(format = "DER", pkcs = 8))
atexit(kekek_handle.delete)