Skip to content

Commit 1ee1f92

Browse files
committed
added clarifying comments to repo and key loading
1 parent 4d8732b commit 1ee1f92

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_indefinite_freeze_attack.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,15 +269,16 @@ def test_with_tuf(self):
269269
# Modify the timestamp file on the remote repository. 'timestamp.json'
270270
# must be properly updated and signed with 'repository_tool.py', otherwise
271271
# the client will reject it as invalid metadata.
272+
273+
# Load the repository
272274
repository = repo_tool.load_repository(self.repository_directory)
273-
275+
276+
# Load the timestamp and snapshot keys, since we will be signing a new
277+
# timestamp and a new snapshot file.
274278
key_file = os.path.join(self.keystore_directory, 'timestamp_key')
275279
timestamp_private = repo_tool.import_rsa_privatekey_from_file(key_file,
276280
'password')
277-
278281
repository.timestamp.load_signing_key(timestamp_private)
279-
280-
# Load snapshot keys.
281282
key_file = os.path.join(self.keystore_directory, 'snapshot_key')
282283
snapshot_private = repo_tool.import_rsa_privatekey_from_file(key_file,
283284
'password')

0 commit comments

Comments
 (0)