From 1a826cb4b067fe08912b54451fb519b3a50c5777 Mon Sep 17 00:00:00 2001 From: Lukas Puehringer Date: Thu, 6 Feb 2020 17:40:29 +0100 Subject: [PATCH] Fix tests that use non-public sslib module Signed-off-by: Lukas Puehringer --- tests/test_repository_lib.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_repository_lib.py b/tests/test_repository_lib.py index 557427edf7..e80f2954d2 100755 --- a/tests/test_repository_lib.py +++ b/tests/test_repository_lib.py @@ -52,6 +52,7 @@ import tuf.repository_tool as repo_tool import securesystemslib +import securesystemslib.rsa_keys import securesystemslib.interface import six @@ -173,10 +174,10 @@ def test_import_ed25519_privatekey_from_file(self): # Invalid private key imported (contains unexpected keytype.) imported_ed25519_key['keytype'] = 'invalid_keytype' - # Use 'pyca_crypto_keys.py' to bypass the key format validation performed by + # Use 'rsa_keys.py' to bypass the key format validation performed by # 'keys.py'. salt, iterations, derived_key = \ - securesystemslib.pyca_crypto_keys._generate_derived_key('pw') + securesystemslib.rsa_keys._generate_derived_key('pw') # Store the derived key info in a dictionary, the object expected # by the non-public _encrypt() routine. @@ -185,8 +186,7 @@ def test_import_ed25519_privatekey_from_file(self): # Convert the key object to json string format and encrypt it with the # derived key. - encrypted_key = \ - securesystemslib.pyca_crypto_keys._encrypt( + encrypted_key = securesystemslib.rsa_keys._encrypt( json.dumps(imported_ed25519_key), derived_key_information) with open(ed25519_keypath, 'wb') as file_object: