Skip to content

Commit

Permalink
Use valid RSA key size in test of MGF1 with MD5
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Jun 29, 2023
1 parent 0fe6a41 commit 580756c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/hazmat/backends/test_openssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
DummyHashAlgorithm,
DummyMode,
)
from ...hazmat.primitives.test_rsa import rsa_key_512, rsa_key_2048
from ...hazmat.primitives.test_rsa import rsa_key_2048
from ...utils import (
load_vectors_from_file,
raises_unsupported_algorithm,
)

# Make ruff happy since we're importing fixtures that pytest patches in as
# func args
__all__ = ["rsa_key_512", "rsa_key_2048"]
__all__ = ["rsa_key_2048"]


def skip_if_libre_ssl(openssl_version):
Expand Down Expand Up @@ -270,9 +270,9 @@ def test_rsa_padding_unsupported_mgf(self):
is False
)

def test_unsupported_mgf1_hash_algorithm_md5_decrypt(self, rsa_key_512):
def test_unsupported_mgf1_hash_algorithm_md5_decrypt(self, rsa_key_2048):
with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_PADDING):
rsa_key_512.decrypt(
rsa_key_2048.decrypt(
b"0" * 64,
padding.OAEP(
mgf=padding.MGF1(algorithm=hashes.MD5()),
Expand Down

0 comments on commit 580756c

Please sign in to comment.