Marco Ricci commited on 2025-01-20 15:10:25
Zeige 1 geänderte Dateien mit 6 Einfügungen und 6 Löschungen.
The names changed in d58a3abf705eba597a358c323416c325aa649a02, but the tests were still using the old names. Oops.
... | ... |
@@ -303,7 +303,7 @@ class TestStoreroom: |
303 | 303 |
hashing_key=bytes(storeroom.KEY_SIZE), |
304 | 304 |
) |
305 | 305 |
with pytest.raises(ValueError, match='Cannot handle version 255'): |
306 |
- storeroom.decrypt_bucket_item(bucket_item, master_keys) |
|
306 |
+ storeroom._decrypt_bucket_item(bucket_item, master_keys) |
|
307 | 307 |
|
308 | 308 |
@pytest.mark.parametrize('config', ['xxx', 'null', '{"version": 255}']) |
309 | 309 |
def test_401_decrypt_bucket_file_bad_json_or_version( |
... | ... |
@@ -325,7 +325,7 @@ class TestStoreroom: |
325 | 325 |
with open('.vault/20', 'w', encoding='UTF-8') as outfile: |
326 | 326 |
print(config, file=outfile) |
327 | 327 |
with pytest.raises(ValueError, match='Invalid bucket file: '): |
328 |
- list(storeroom.decrypt_bucket_file('.vault/20', master_keys)) |
|
328 |
+ list(storeroom._decrypt_bucket_file('.vault/20', master_keys)) |
|
329 | 329 |
|
330 | 330 |
@pytest.mark.parametrize( |
331 | 331 |
['data', 'err_msg'], |
... | ... |
@@ -442,7 +442,7 @@ class TestStoreroom: |
442 | 442 |
ValueError, |
443 | 443 |
match=r'Invalid encrypted master keys payload', |
444 | 444 |
): |
445 |
- storeroom.decrypt_master_keys_data( |
|
445 |
+ storeroom._decrypt_master_keys_data( |
|
446 | 446 |
data, |
447 | 447 |
_types.StoreroomKeyPair(encryption_key=key, signing_key=key), |
448 | 448 |
) |
... | ... |
@@ -450,7 +450,7 @@ class TestStoreroom: |
450 | 450 |
ValueError, |
451 | 451 |
match=r'Invalid encrypted session keys payload', |
452 | 452 |
): |
453 |
- storeroom.decrypt_session_keys( |
|
453 |
+ storeroom._decrypt_session_keys( |
|
454 | 454 |
data, |
455 | 455 |
_types.StoreroomMasterKeys( |
456 | 456 |
hashing_key=key, encryption_key=key, signing_key=key |
... | ... |
@@ -470,12 +470,12 @@ class TestStoreroom: |
470 | 470 |
# computationally infeasible, and the chance of finding one by |
471 | 471 |
# such random sampling is astronomically tiny. |
472 | 472 |
with pytest.raises(cryptography.exceptions.InvalidSignature): |
473 |
- storeroom.decrypt_master_keys_data( |
|
473 |
+ storeroom._decrypt_master_keys_data( |
|
474 | 474 |
data, |
475 | 475 |
_types.StoreroomKeyPair(encryption_key=key, signing_key=key), |
476 | 476 |
) |
477 | 477 |
with pytest.raises(cryptography.exceptions.InvalidSignature): |
478 |
- storeroom.decrypt_session_keys( |
|
478 |
+ storeroom._decrypt_session_keys( |
|
479 | 479 |
data, |
480 | 480 |
_types.StoreroomMasterKeys( |
481 | 481 |
hashing_key=key, encryption_key=key, signing_key=key |
482 | 482 |