Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some skips in tests that aren't needed anymore #10223

Merged
merged 1 commit into from Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 4 additions & 14 deletions tests/hazmat/primitives/test_dh.py
Expand Up @@ -753,38 +753,33 @@ def test_public_bytes_match(

@pytest.mark.skip_fips(reason="non-FIPS parameters")
@pytest.mark.parametrize(
("key_path", "loader_func", "vec_path", "is_dhx"),
("key_path", "loader_func", "vec_path"),
[
(
os.path.join("asymmetric", "DH", "dhpub.pem"),
serialization.load_pem_public_key,
os.path.join("asymmetric", "DH", "dhkey.txt"),
False,
),
(
os.path.join("asymmetric", "DH", "dhpub.der"),
serialization.load_der_public_key,
os.path.join("asymmetric", "DH", "dhkey.txt"),
False,
),
(
os.path.join("asymmetric", "DH", "dhpub_rfc5114_2.pem"),
serialization.load_pem_public_key,
os.path.join("asymmetric", "DH", "dhkey_rfc5114_2.txt"),
True,
),
(
os.path.join("asymmetric", "DH", "dhpub_rfc5114_2.der"),
serialization.load_der_public_key,
os.path.join("asymmetric", "DH", "dhkey_rfc5114_2.txt"),
True,
),
],
)
def test_public_bytes_values(
self, key_path, loader_func, vec_path, is_dhx, backend
self, key_path, loader_func, vec_path, backend
):
_skip_dhx_unsupported(backend, is_dhx)
key_bytes = load_vectors_from_file(
key_path, lambda pemfile: pemfile.read(), mode="rb"
)
Expand Down Expand Up @@ -882,38 +877,33 @@ def test_parameter_bytes_match(
assert serialized == param_bytes

@pytest.mark.parametrize(
("param_path", "loader_func", "vec_path", "is_dhx"),
("param_path", "loader_func", "vec_path"),
[
(
os.path.join("asymmetric", "DH", "dhp.pem"),
serialization.load_pem_parameters,
os.path.join("asymmetric", "DH", "dhkey.txt"),
False,
),
(
os.path.join("asymmetric", "DH", "dhp.der"),
serialization.load_der_parameters,
os.path.join("asymmetric", "DH", "dhkey.txt"),
False,
),
(
os.path.join("asymmetric", "DH", "dhp_rfc5114_2.pem"),
serialization.load_pem_parameters,
os.path.join("asymmetric", "DH", "dhkey_rfc5114_2.txt"),
True,
),
(
os.path.join("asymmetric", "DH", "dhp_rfc5114_2.der"),
serialization.load_der_parameters,
os.path.join("asymmetric", "DH", "dhkey_rfc5114_2.txt"),
True,
),
],
)
def test_public_bytes_values(
self, param_path, loader_func, vec_path, backend, is_dhx
self, param_path, loader_func, vec_path, backend
):
_skip_dhx_unsupported(backend, is_dhx)
key_bytes = load_vectors_from_file(
param_path, lambda pemfile: pemfile.read(), mode="rb"
)
Expand Down
11 changes: 0 additions & 11 deletions tests/hazmat/primitives/test_rsa.py
Expand Up @@ -292,17 +292,6 @@ def test_load_pss_keys_strips_constraints(self, path, backend):
signature, b"whatever", padding.PKCS1v15(), hashes.SHA224()
)

@pytest.mark.supported(
only_if=lambda backend: (
not backend._lib.CRYPTOGRAPHY_IS_BORINGSSL
and (
not backend._lib.CRYPTOGRAPHY_OPENSSL_LESS_THAN_111E
or backend._lib.CRYPTOGRAPHY_IS_LIBRESSL
and not backend._lib.CRYPTOGRAPHY_LIBRESSL_LESS_THAN_380
)
),
skip_message="Does not support RSA PSS loading",
)
def test_load_pss_pub_keys_strips_constraints(self, backend):
key = load_vectors_from_file(
filename=os.path.join(
Expand Down
8 changes: 0 additions & 8 deletions tests/x509/test_x509.py
Expand Up @@ -792,14 +792,6 @@ def test_get_revoked_certificate_doesnt_reorder(
assert crl[2].serial_number == 3


@pytest.mark.supported(
only_if=lambda backend: (
not backend._lib.CRYPTOGRAPHY_IS_LIBRESSL
and not backend._lib.CRYPTOGRAPHY_IS_BORINGSSL
and not backend._lib.CRYPTOGRAPHY_OPENSSL_LESS_THAN_111E
),
skip_message="Does not support RSA PSS loading",
)
class TestRSAPSSCertificate:
def test_load_cert_pub_key(self, backend):
cert = _load_cert(
Expand Down