mirror of
https://github.com/saymrwulf/cryptography.git
synced 2026-05-14 20:37:55 +00:00
Remove some skips in tests that aren't needed anymore (#10223)
This commit is contained in:
parent
71929bd91f
commit
d54093e62e
3 changed files with 4 additions and 33 deletions
|
|
@ -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"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in a new issue