Skip to content

Commit

Permalink
Fix tests that use non-public sslib module
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Puehringer <[email protected]>
  • Loading branch information
lukpueh committed Feb 6, 2020
1 parent 08f50ab commit 1a826cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_repository_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
import tuf.repository_tool as repo_tool

import securesystemslib
import securesystemslib.rsa_keys
import securesystemslib.interface
import six

Expand Down Expand Up @@ -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.
Expand All @@ -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:
Expand Down

0 comments on commit 1a826cb

Please sign in to comment.