Skip to content

Commit ad65dc5

Browse files
authored
Provide a password for encryption tests (#12347)
It's never used, because of malformations, but provide one.
1 parent f0ca214 commit ad65dc5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/hazmat/primitives/test_serialization.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,7 @@ def test_pem_encryption_missing_dek_info(self):
11661166
mode="rb",
11671167
)
11681168
with pytest.raises(ValueError):
1169-
load_pem_private_key(data, password=None)
1169+
load_pem_private_key(data, password=b"password")
11701170

11711171
def test_pem_encryption_malformed_dek_info(self):
11721172
data = load_vectors_from_file(
@@ -1179,7 +1179,7 @@ def test_pem_encryption_malformed_dek_info(self):
11791179
mode="rb",
11801180
)
11811181
with pytest.raises(ValueError):
1182-
load_pem_private_key(data, password=None)
1182+
load_pem_private_key(data, password=b"password")
11831183

11841184
def test_pem_encryption_malformed_iv(self):
11851185
data = load_vectors_from_file(
@@ -1192,7 +1192,7 @@ def test_pem_encryption_malformed_iv(self):
11921192
mode="rb",
11931193
)
11941194
with pytest.raises(ValueError):
1195-
load_pem_private_key(data, password=None)
1195+
load_pem_private_key(data, password=b"password")
11961196

11971197

11981198
class TestKeySerializationEncryptionTypes:

0 commit comments

Comments
 (0)