Skip to content

Commit e92ef92

Browse files
committed
Separate targets and snapshot/timestamp schemas
This separation and refactoring is part of the change to make length and hashes optional for timestamp and snapshot roles. It separates FILEINFO_SCHEMA into two separate schemas: TARGETS_FILEINFO_SCHEMA and METADATA_FILEINFO_SCHEMA. The distinction is needed because as of version 1.0.1 of the tuf spec targets role has mandatory length and hashes, and snapshot and timestamp roles have a mandatory version, and optional length and hashes. That's why targets can't share the same schemas as timestamp and snapshot. Because of that schema distinction, make_fileinfo had to be too separated into make_targets_fileinfo and make_metadata_fileinfo. Signed-off-by: Martin Vrachev <[email protected]>
1 parent 8baa0d0 commit e92ef92

12 files changed

+185
-88
lines changed

tests/test_arbitrary_package_attack.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def test_without_tuf(self):
180180
client_target_path = os.path.join(self.client_directory, 'file1.txt')
181181
self.assertFalse(os.path.exists(client_target_path))
182182
length, hashes = securesystemslib.util.get_file_details(target_path)
183-
fileinfo = tuf.formats.make_fileinfo(length, hashes)
183+
fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
184184

185185
url_prefix = self.repository_mirrors['mirror1']['url_prefix']
186186
url_file = os.path.join(url_prefix, 'targets', 'file1.txt')
@@ -190,20 +190,20 @@ def test_without_tuf(self):
190190

191191
self.assertTrue(os.path.exists(client_target_path))
192192
length, hashes = securesystemslib.util.get_file_details(client_target_path)
193-
download_fileinfo = tuf.formats.make_fileinfo(length, hashes)
193+
download_fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
194194
self.assertEqual(fileinfo, download_fileinfo)
195195

196196
# Test: Download a target file that has been modified by an attacker.
197197
with open(target_path, 'wt') as file_object:
198198
file_object.write('add malicious content.')
199199
length, hashes = securesystemslib.util.get_file_details(target_path)
200-
malicious_fileinfo = tuf.formats.make_fileinfo(length, hashes)
200+
malicious_fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
201201

202202
# On Windows, the URL portion should not contain back slashes.
203203
six.moves.urllib.request.urlretrieve(url_file.replace('\\', '/'), client_target_path)
204204

205205
length, hashes = securesystemslib.util.get_file_details(client_target_path)
206-
download_fileinfo = tuf.formats.make_fileinfo(length, hashes)
206+
download_fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
207207

208208
# Verify 'download_fileinfo' is unequal to the original trusted version.
209209
self.assertNotEqual(download_fileinfo, fileinfo)

tests/test_endless_data_attack.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def test_without_tuf(self):
184184
client_target_path = os.path.join(self.client_directory, 'file1.txt')
185185
self.assertFalse(os.path.exists(client_target_path))
186186
length, hashes = securesystemslib.util.get_file_details(target_path)
187-
fileinfo = tuf.formats.make_fileinfo(length, hashes)
187+
fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
188188

189189
url_prefix = self.repository_mirrors['mirror1']['url_prefix']
190190
url_file = os.path.join(url_prefix, 'targets', 'file1.txt')
@@ -194,15 +194,15 @@ def test_without_tuf(self):
194194

195195
self.assertTrue(os.path.exists(client_target_path))
196196
length, hashes = securesystemslib.util.get_file_details(client_target_path)
197-
download_fileinfo = tuf.formats.make_fileinfo(length, hashes)
197+
download_fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
198198
self.assertEqual(fileinfo, download_fileinfo)
199199

200200
# Test: Download a target file that has been modified by an attacker with
201201
# extra data.
202202
with open(target_path, 'a') as file_object:
203203
file_object.write('append large amount of data' * 100000)
204204
large_length, hashes = securesystemslib.util.get_file_details(target_path)
205-
malicious_fileinfo = tuf.formats.make_fileinfo(large_length, hashes)
205+
malicious_fileinfo = tuf.formats.make_targets_fileinfo(large_length, hashes)
206206

207207
# Is the modified file actually larger?
208208
self.assertTrue(large_length > length)
@@ -211,7 +211,7 @@ def test_without_tuf(self):
211211
six.moves.urllib.request.urlretrieve(url_file.replace('\\', '/'), client_target_path)
212212

213213
length, hashes = securesystemslib.util.get_file_details(client_target_path)
214-
download_fileinfo = tuf.formats.make_fileinfo(length, hashes)
214+
download_fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
215215

216216
# Verify 'download_fileinfo' is unequal to the original trusted version.
217217
self.assertNotEqual(download_fileinfo, fileinfo)
@@ -235,10 +235,10 @@ def test_with_tuf(self):
235235
# Verify the client's downloaded file matches the repository's.
236236
target_path = os.path.join(self.repository_directory, 'targets', 'file1.txt')
237237
length, hashes = securesystemslib.util.get_file_details(client_target_path)
238-
fileinfo = tuf.formats.make_fileinfo(length, hashes)
238+
fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
239239

240240
length, hashes = securesystemslib.util.get_file_details(client_target_path)
241-
download_fileinfo = tuf.formats.make_fileinfo(length, hashes)
241+
download_fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
242242
self.assertEqual(fileinfo, download_fileinfo)
243243

244244
# Modify 'file1.txt' and confirm that the TUF client only downloads up to
@@ -257,7 +257,7 @@ def test_with_tuf(self):
257257
# extra data appended should be discarded by the client, so the downloaded
258258
# file size and hash should not have changed.
259259
length, hashes = securesystemslib.util.get_file_details(client_target_path)
260-
download_fileinfo = tuf.formats.make_fileinfo(length, hashes)
260+
download_fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
261261
self.assertEqual(fileinfo, download_fileinfo)
262262

263263
# Test that the TUF client does not download large metadata files, as well.

tests/test_formats.py

Lines changed: 54 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,14 @@ def test_schemas(self):
119119
'keyval': {'public': 'pubkey',
120120
'private': 'privkey'}}),
121121

122-
'FILEINFO_SCHEMA': (tuf.formats.FILEINFO_SCHEMA,
122+
'TARGETS_FILEINFO_SCHEMA': (tuf.formats.TARGETS_FILEINFO_SCHEMA,
123123
{'length': 1024,
124124
'hashes': {'sha256': 'A4582BCF323BCEF'},
125125
'custom': {'type': 'paintjob'}}),
126126

127+
'METADATA_FILEINFO_SCHEMA': (tuf.formats.METADATA_FILEINFO_SCHEMA,
128+
{'version': 1}),
129+
127130
'FILEDICT_SCHEMA': (tuf.formats.FILEDICT_SCHEMA,
128131
{'metadata/root.json': {'length': 1024,
129132
'hashes': {'sha256': 'ABCD123'},
@@ -241,7 +244,8 @@ def test_schemas(self):
241244
'version': 8,
242245
'expires': '1985-10-21T13:20:00Z',
243246
'meta': {'metadattimestamp.json': {'length': 1024,
244-
'hashes': {'sha256': 'AB1245'}}}}),
247+
'hashes': {'sha256': 'AB1245'},
248+
'version': 1}}}),
245249

246250
'MIRROR_SCHEMA': (tuf.formats.MIRROR_SCHEMA,
247251
{'url_prefix': 'http://localhost:8001',
@@ -394,7 +398,7 @@ def test_build_dict_conforming_to_schema(self):
394398
length = 88
395399
hashes = {'sha256': '3c7fe3eeded4a34'}
396400
expires = '1985-10-21T13:20:00Z'
397-
filedict = {'snapshot.json': {'length': length, 'hashes': hashes}}
401+
filedict = {'snapshot.json': {'length': length, 'hashes': hashes, 'version': 1}}
398402

399403

400404
# Try with and without _type and spec_version, both of which are
@@ -797,28 +801,65 @@ def test_make_signable(self):
797801

798802

799803

800-
def test_make_fileinfo(self):
804+
def test_make_targets_fileinfo(self):
805+
# Test conditions for valid arguments.
806+
length = 1024
807+
hashes = {'sha256': 'A4582BCF323BCEF', 'sha512': 'A4582BCF323BFEF'}
808+
version = 8
809+
custom = {'type': 'paintjob'}
810+
811+
TARGETS_FILEINFO_SCHEMA = tuf.formats.TARGETS_FILEINFO_SCHEMA
812+
make_targets_fileinfo = tuf.formats.make_targets_fileinfo
813+
self.assertTrue(TARGETS_FILEINFO_SCHEMA.matches(make_targets_fileinfo(length, hashes, version, custom)))
814+
self.assertTrue(TARGETS_FILEINFO_SCHEMA.matches(make_targets_fileinfo(length, hashes)))
815+
816+
# Test conditions for invalid arguments.
817+
bad_length = 'bad'
818+
bad_hashes = 'bad'
819+
bad_custom = 'bad'
820+
821+
self.assertRaises(securesystemslib.exceptions.FormatError, make_targets_fileinfo,
822+
bad_length, hashes, custom)
823+
self.assertRaises(securesystemslib.exceptions.FormatError, make_targets_fileinfo,
824+
length, bad_hashes, custom)
825+
self.assertRaises(securesystemslib.exceptions.FormatError, make_targets_fileinfo,
826+
length, hashes, bad_custom)
827+
self.assertRaises(securesystemslib.exceptions.FormatError, make_targets_fileinfo,
828+
bad_length, hashes)
829+
self.assertRaises(securesystemslib.exceptions.FormatError, make_targets_fileinfo,
830+
length, bad_hashes)
831+
832+
833+
834+
def test_make_metadata_fileinfo(self):
801835
# Test conditions for valid arguments.
802836
length = 1024
803837
hashes = {'sha256': 'A4582BCF323BCEF', 'sha512': 'A4582BCF323BFEF'}
804838
version = 8
805839
custom = {'type': 'paintjob'}
806840

807-
FILEINFO_SCHEMA = tuf.formats.FILEINFO_SCHEMA
808-
make_fileinfo = tuf.formats.make_fileinfo
809-
self.assertTrue(FILEINFO_SCHEMA.matches(make_fileinfo(length, hashes, version, custom)))
810-
self.assertTrue(FILEINFO_SCHEMA.matches(make_fileinfo(length, hashes)))
841+
METADATA_FILEINFO_SCHEMA = tuf.formats.METADATA_FILEINFO_SCHEMA
842+
make_metadata_fileinfo = tuf.formats.make_metadata_fileinfo
843+
self.assertTrue(METADATA_FILEINFO_SCHEMA.matches(make_metadata_fileinfo(
844+
version, length, hashes, custom)))
845+
self.assertTrue(METADATA_FILEINFO_SCHEMA.matches(make_metadata_fileinfo(version)))
811846

812847
# Test conditions for invalid arguments.
848+
bad_version = 'bad'
813849
bad_length = 'bad'
814850
bad_hashes = 'bad'
815851
bad_custom = 'bad'
816852

817-
self.assertRaises(securesystemslib.exceptions.FormatError, make_fileinfo, bad_length, hashes, custom)
818-
self.assertRaises(securesystemslib.exceptions.FormatError, make_fileinfo, length, bad_hashes, custom)
819-
self.assertRaises(securesystemslib.exceptions.FormatError, make_fileinfo, length, hashes, bad_custom)
820-
self.assertRaises(securesystemslib.exceptions.FormatError, make_fileinfo, bad_length, hashes)
821-
self.assertRaises(securesystemslib.exceptions.FormatError, make_fileinfo, length, bad_hashes)
853+
self.assertRaises(securesystemslib.exceptions.FormatError, make_metadata_fileinfo,
854+
bad_version, length, hashes, custom)
855+
self.assertRaises(securesystemslib.exceptions.FormatError, make_metadata_fileinfo,
856+
version, bad_length, hashes, custom)
857+
self.assertRaises(securesystemslib.exceptions.FormatError, make_metadata_fileinfo,
858+
version, length, bad_hashes, custom)
859+
self.assertRaises(securesystemslib.exceptions.FormatError, make_metadata_fileinfo,
860+
version, length, hashes, bad_custom)
861+
self.assertRaises(securesystemslib.exceptions.FormatError, make_metadata_fileinfo,
862+
bad_version)
822863

823864

824865

tests/test_indefinite_freeze_attack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,15 +230,15 @@ def test_without_tuf(self):
230230
shutil.copy(timestamp_path, client_timestamp_path)
231231

232232
length, hashes = securesystemslib.util.get_file_details(timestamp_path)
233-
fileinfo = tuf.formats.make_fileinfo(length, hashes)
233+
fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
234234

235235
url_prefix = self.repository_mirrors['mirror1']['url_prefix']
236236
url_file = os.path.join(url_prefix, 'metadata', 'timestamp.json')
237237

238238
six.moves.urllib.request.urlretrieve(url_file.replace('\\', '/'), client_timestamp_path)
239239

240240
length, hashes = securesystemslib.util.get_file_details(client_timestamp_path)
241-
download_fileinfo = tuf.formats.make_fileinfo(length, hashes)
241+
download_fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
242242

243243
# Verify 'download_fileinfo' is equal to the current local file.
244244
self.assertEqual(download_fileinfo, fileinfo)

tests/test_replay_attack.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def test_without_tuf(self):
205205
# The fileinfo of the previous version is saved to verify that it is indeed
206206
# accepted by the non-TUF client.
207207
length, hashes = securesystemslib.util.get_file_details(backup_timestamp)
208-
previous_fileinfo = tuf.formats.make_fileinfo(length, hashes)
208+
previous_fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
209209

210210
# Modify the timestamp file on the remote repository.
211211
repository = repo_tool.load_repository(self.repository_directory)
@@ -227,7 +227,7 @@ def test_without_tuf(self):
227227
# Save the fileinfo of the new version generated to verify that it is
228228
# saved by the client.
229229
length, hashes = securesystemslib.util.get_file_details(timestamp_path)
230-
new_fileinfo = tuf.formats.make_fileinfo(length, hashes)
230+
new_fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
231231

232232
url_prefix = self.repository_mirrors['mirror1']['url_prefix']
233233
url_file = os.path.join(url_prefix, 'metadata', 'timestamp.json')
@@ -238,7 +238,7 @@ def test_without_tuf(self):
238238
six.moves.urllib.request.urlretrieve(url_file.replace('\\', '/'), client_timestamp_path)
239239

240240
length, hashes = securesystemslib.util.get_file_details(client_timestamp_path)
241-
download_fileinfo = tuf.formats.make_fileinfo(length, hashes)
241+
download_fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
242242

243243
# Verify 'download_fileinfo' is equal to the new version.
244244
self.assertEqual(download_fileinfo, new_fileinfo)
@@ -251,7 +251,7 @@ def test_without_tuf(self):
251251
six.moves.urllib.request.urlretrieve(url_file.replace('\\', '/'), client_timestamp_path)
252252

253253
length, hashes = securesystemslib.util.get_file_details(client_timestamp_path)
254-
download_fileinfo = tuf.formats.make_fileinfo(length, hashes)
254+
download_fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
255255

256256
# Verify 'download_fileinfo' is equal to the previous version.
257257
self.assertEqual(download_fileinfo, previous_fileinfo)
@@ -278,7 +278,7 @@ def test_with_tuf(self):
278278
# The fileinfo of the previous version is saved to verify that it is indeed
279279
# accepted by the non-TUF client.
280280
length, hashes = securesystemslib.util.get_file_details(backup_timestamp)
281-
previous_fileinfo = tuf.formats.make_fileinfo(length, hashes)
281+
previous_fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
282282

283283
# Modify the timestamp file on the remote repository.
284284
repository = repo_tool.load_repository(self.repository_directory)
@@ -300,7 +300,7 @@ def test_with_tuf(self):
300300
# Save the fileinfo of the new version generated to verify that it is
301301
# saved by the client.
302302
length, hashes = securesystemslib.util.get_file_details(timestamp_path)
303-
new_fileinfo = tuf.formats.make_fileinfo(length, hashes)
303+
new_fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
304304

305305
# Refresh top-level metadata, including 'timestamp.json'. Installation of
306306
# new version of 'timestamp.json' is expected.
@@ -309,7 +309,7 @@ def test_with_tuf(self):
309309
client_timestamp_path = os.path.join(self.client_directory,
310310
self.repository_name, 'metadata', 'current', 'timestamp.json')
311311
length, hashes = securesystemslib.util.get_file_details(client_timestamp_path)
312-
download_fileinfo = tuf.formats.make_fileinfo(length, hashes)
312+
download_fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
313313

314314
# Verify 'download_fileinfo' is equal to the new version.
315315
self.assertEqual(download_fileinfo, new_fileinfo)

tests/test_repository_lib.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ def test_get_metadata_filenames(self):
227227

228228

229229

230-
def test_get_metadata_fileinfo(self):
230+
def test_get_targets_metadata_fileinfo(self):
231231
# Test normal case.
232232
temporary_directory = tempfile.mkdtemp(dir=self.temporary_directory)
233233
test_filepath = os.path.join(temporary_directory, 'file.txt')
@@ -236,31 +236,31 @@ def test_get_metadata_fileinfo(self):
236236
file_object.write('test file')
237237

238238
# Generate test fileinfo object. It is assumed SHA256 and SHA512 hashes
239-
# are computed by get_metadata_fileinfo().
239+
# are computed by get_targets_metadata_fileinfo().
240240
file_length = os.path.getsize(test_filepath)
241241
sha256_digest_object = securesystemslib.hash.digest_filename(test_filepath)
242242
sha512_digest_object = securesystemslib.hash.digest_filename(test_filepath, algorithm='sha512')
243243
file_hashes = {'sha256': sha256_digest_object.hexdigest(),
244244
'sha512': sha512_digest_object.hexdigest()}
245245
fileinfo = {'length': file_length, 'hashes': file_hashes}
246-
self.assertTrue(tuf.formats.FILEINFO_SCHEMA.matches(fileinfo))
246+
self.assertTrue(tuf.formats.TARGETS_FILEINFO_SCHEMA.matches(fileinfo))
247247

248248
storage_backend = securesystemslib.storage.FilesystemBackend()
249249

250-
self.assertEqual(fileinfo, repo_lib.get_metadata_fileinfo(test_filepath,
250+
self.assertEqual(fileinfo, repo_lib.get_targets_metadata_fileinfo(test_filepath,
251251
storage_backend))
252252

253253

254254
# Test improperly formatted argument.
255255
self.assertRaises(securesystemslib.exceptions.FormatError,
256-
repo_lib.get_metadata_fileinfo, 3,
256+
repo_lib.get_targets_metadata_fileinfo, 3,
257257
storage_backend)
258258

259259

260260
# Test non-existent file.
261261
nonexistent_filepath = os.path.join(temporary_directory, 'oops.txt')
262262
self.assertRaises(securesystemslib.exceptions.Error,
263-
repo_lib.get_metadata_fileinfo,
263+
repo_lib.get_targets_metadata_fileinfo,
264264
nonexistent_filepath, storage_backend)
265265

266266

tests/test_repository_tool.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,8 @@ def test_writeall_no_files(self):
460460
# Add target fileinfo
461461
target1_hashes = {'sha256': 'c2986576f5fdfd43944e2b19e775453b96748ec4fe2638a6d2f32f1310967095'}
462462
target2_hashes = {'sha256': '517c0ce943e7274a2431fa5751e17cfd5225accd23e479bfaad13007751e87ef'}
463-
target1_fileinfo = tuf.formats.make_fileinfo(555, target1_hashes)
464-
target2_fileinfo = tuf.formats.make_fileinfo(37, target2_hashes)
463+
target1_fileinfo = tuf.formats.make_targets_fileinfo(555, target1_hashes)
464+
target2_fileinfo = tuf.formats.make_targets_fileinfo(37, target2_hashes)
465465
target1 = 'file1.txt'
466466
target2 = 'file2.txt'
467467
repository.targets.add_target(target1, fileinfo=target1_fileinfo)
@@ -1527,7 +1527,7 @@ def test_add_target_to_bin(self):
15271527

15281528
# Test adding a target with fileinfo
15291529
target2_hashes = {'sha256': '517c0ce943e7274a2431fa5751e17cfd5225accd23e479bfaad13007751e87ef'}
1530-
target2_fileinfo = tuf.formats.make_fileinfo(37, target2_hashes)
1530+
target2_fileinfo = tuf.formats.make_targets_fileinfo(37, target2_hashes)
15311531
target2_filepath = 'file2.txt'
15321532

15331533
self.targets_object.add_target_to_bin(target2_filepath, 16, fileinfo=target2_fileinfo)

tests/test_updater.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ def test_1__update_fileinfo(self):
494494
self.assertTrue(tuf.formats.FILEDICT_SCHEMA.matches(fileinfo_dict))
495495
root_filepath = os.path.join(self.client_metadata_current, 'root.json')
496496
length, hashes = securesystemslib.util.get_file_details(root_filepath)
497-
root_fileinfo = tuf.formats.make_fileinfo(length, hashes)
497+
root_fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
498498
self.assertTrue('root.json' in fileinfo_dict)
499499
self.assertEqual(fileinfo_dict['root.json'], root_fileinfo)
500500

@@ -515,18 +515,18 @@ def test_2__fileinfo_has_changed(self):
515515
# Verify that the method returns 'False' if file info was not changed.
516516
root_filepath = os.path.join(self.client_metadata_current, 'root.json')
517517
length, hashes = securesystemslib.util.get_file_details(root_filepath)
518-
root_fileinfo = tuf.formats.make_fileinfo(length, hashes)
518+
root_fileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
519519
self.assertFalse(self.repository_updater._fileinfo_has_changed('root.json',
520520
root_fileinfo))
521521

522522
# Verify that the method returns 'True' if length or hashes were changed.
523523
new_length = 8
524-
new_root_fileinfo = tuf.formats.make_fileinfo(new_length, hashes)
524+
new_root_fileinfo = tuf.formats.make_targets_fileinfo(new_length, hashes)
525525
self.assertTrue(self.repository_updater._fileinfo_has_changed('root.json',
526526
new_root_fileinfo))
527527
# Hashes were changed.
528528
new_hashes = {'sha256': self.random_string()}
529-
new_root_fileinfo = tuf.formats.make_fileinfo(length, new_hashes)
529+
new_root_fileinfo = tuf.formats.make_targets_fileinfo(length, new_hashes)
530530
self.assertTrue(self.repository_updater._fileinfo_has_changed('root.json',
531531
new_root_fileinfo))
532532

@@ -1260,7 +1260,7 @@ def test_6_download_target(self):
12601260
length, hashes = \
12611261
securesystemslib.util.get_file_details(download_filepath,
12621262
securesystemslib.settings.HASH_ALGORITHMS)
1263-
download_targetfileinfo = tuf.formats.make_fileinfo(length, hashes)
1263+
download_targetfileinfo = tuf.formats.make_targets_fileinfo(length, hashes)
12641264

12651265
# Add any 'custom' data from the repository's target fileinfo to the
12661266
# 'download_targetfileinfo' object being tested.

0 commit comments

Comments
 (0)