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

This commit is contained in:
Alex Gaynor 2024-01-22 08:07:53 -05:00 committed by GitHub
parent 71929bd91f
commit d54093e62e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 33 deletions

View file

@ -753,38 +753,33 @@ class TestDHPublicKeySerialization:
@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"
)
@ -882,38 +877,33 @@ class TestDHParameterSerialization:
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"
)

View file

@ -292,17 +292,6 @@ class TestRSA:
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(

View file

@ -792,14 +792,6 @@ class TestRevokedCertificate:
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(