diff --git a/src/_cffi_src/openssl/ct.py b/src/_cffi_src/openssl/ct.py
--- a/src/_cffi_src/openssl/ct.py
+++ b/src/_cffi_src/openssl/ct.py
@@ -50,13 +50,14 @@
 
 int SCT_set_source(SCT *, sct_source_t);
 
+Cryptography_STACK_OF_SCT *sk_SCT_new_null(void);
+void sk_SCT_free(Cryptography_STACK_OF_SCT *);
 int sk_SCT_num(const Cryptography_STACK_OF_SCT *);
 SCT *sk_SCT_value(const Cryptography_STACK_OF_SCT *, int);
+int sk_SCT_push(Cryptography_STACK_OF_SCT *, SCT *);
 
 void SCT_LIST_free(Cryptography_STACK_OF_SCT *);
 
-int sk_SCT_push(Cryptography_STACK_OF_SCT *, SCT *);
-Cryptography_STACK_OF_SCT *sk_SCT_new_null(void);
 SCT *SCT_new(void);
 int SCT_set1_log_id(SCT *, unsigned char *, size_t);
 void SCT_set_timestamp(SCT *, uint64_t);
@@ -101,12 +102,13 @@
 
 int (*SCT_set_source)(SCT *, sct_source_t) = NULL;
 
+Cryptography_STACK_OF_SCT *(*sk_SCT_new_null)(void) = NULL;
+void (*sk_SCT_free)(Cryptography_STACK_OF_SCT *) = NULL;
 int (*sk_SCT_num)(const Cryptography_STACK_OF_SCT *) = NULL;
 SCT *(*sk_SCT_value)(const Cryptography_STACK_OF_SCT *, int) = NULL;
+int (*sk_SCT_push)(Cryptography_STACK_OF_SCT *, SCT *) = NULL;
 
 void (*SCT_LIST_free)(Cryptography_STACK_OF_SCT *) = NULL;
-int (*sk_SCT_push)(Cryptography_STACK_OF_SCT *, SCT *) = NULL;
-Cryptography_STACK_OF_SCT *(*sk_SCT_new_null)(void) = NULL;
 SCT *(*SCT_new)(void) = NULL;
 int (*SCT_set1_log_id)(SCT *, unsigned char *, size_t) = NULL;
 void (*SCT_set_timestamp)(SCT *, uint64_t) = NULL;
diff --git a/src/cryptography/hazmat/backends/openssl/encode_asn1.py b/src/cryptography/hazmat/backends/openssl/encode_asn1.py
--- a/src/cryptography/hazmat/backends/openssl/encode_asn1.py
+++ b/src/cryptography/hazmat/backends/openssl/encode_asn1.py
@@ -604,11 +604,21 @@ def _encode_general_subtree(backend, subtrees):
             gs = backend._lib.GENERAL_SUBTREE_new()
             gs.base = _encode_general_name(backend, name)
             res = backend._lib.sk_GENERAL_SUBTREE_push(general_subtrees, gs)
-            assert res >= 1
+            backend.openssl_assert(res >= 1)
 
         return general_subtrees
 
 
+def _encode_precert_signed_certificate_timestamps(backend, scts):
+    sct_stack = backend._lib.sk_SCT_new_null()
+    backend.openssl_assert(sct_stack != backend._ffi.NULL)
+    sct_stack = backend._ffi.gc(sct_stack, backend._lib.sk_SCT_free)
+    for sct in scts:
+        res = backend._lib.sk_SCT_push(sct_stack, sct._sct)
+        backend.openssl_assert(res >= 1)
+    return sct_stack
+
+
 def _encode_nonce(backend, nonce):
     return _encode_asn1_str_gc(backend, nonce.nonce)
 
@@ -630,6 +640,9 @@ def _encode_nonce(backend, nonce):
     ExtensionOID.OCSP_NO_CHECK: _encode_ocsp_nocheck,
     ExtensionOID.NAME_CONSTRAINTS: _encode_name_constraints,
     ExtensionOID.POLICY_CONSTRAINTS: _encode_policy_constraints,
+    ExtensionOID.PRECERT_SIGNED_CERTIFICATE_TIMESTAMPS: (
+        _encode_precert_signed_certificate_timestamps
+    ),
 }
 
 _CRL_EXTENSION_ENCODE_HANDLERS = {
diff --git a/src/cryptography/hazmat/bindings/openssl/_conditional.py b/src/cryptography/hazmat/bindings/openssl/_conditional.py
--- a/src/cryptography/hazmat/bindings/openssl/_conditional.py
+++ b/src/cryptography/hazmat/bindings/openssl/_conditional.py
@@ -100,11 +100,12 @@ def cryptography_has_sct():
         "SCT_get0_signature",
         "SCT_get_timestamp",
         "SCT_set_source",
+        "sk_SCT_new_null",
+        "sk_SCT_free",
         "sk_SCT_num",
         "sk_SCT_value",
-        "SCT_LIST_free",
         "sk_SCT_push",
-        "sk_SCT_new_null",
+        "SCT_LIST_free",
         "SCT_new",
         "SCT_set1_log_id",
         "SCT_set_timestamp",

diff --git a/tests/x509/test_x509_ext.py b/tests/x509/test_x509_ext.py
--- a/tests/x509/test_x509_ext.py
+++ b/tests/x509/test_x509_ext.py
@@ -5678,6 +5678,33 @@ def test_simple(self, backend):
             == x509.certificate_transparency.LogEntryType.PRE_CERTIFICATE
         )
 
+    @pytest.mark.supported(
+        only_if=lambda backend: (backend._lib.Cryptography_HAS_SCT),
+        skip_message="Requires CT support",
+    )
+    def test_generate(self, backend):
+        cert = _load_cert(
+            os.path.join("x509", "badssl-sct.pem"),
+            x509.load_pem_x509_certificate,
+            backend,
+        )
+        scts = cert.extensions.get_extension_for_class(
+            x509.PrecertificateSignedCertificateTimestamps
+        ).value
+        assert len(scts) == 1
+        [sct] = scts
+
+        private_key = RSA_KEY_2048.private_key(backend)
+        builder = _make_certbuilder(private_key).add_extension(
+            x509.PrecertificateSignedCertificateTimestamps([sct]),
+            critical=False,
+        )
+        cert = builder.sign(private_key, hashes.SHA256(), backend)
+        ext = cert.extensions.get_extension_for_class(
+            x509.PrecertificateSignedCertificateTimestamps
+        ).value
+        assert list(ext) == [sct]
+
     @pytest.mark.supported(
         only_if=lambda backend: backend._lib.CRYPTOGRAPHY_IS_LIBRESSL,
         skip_message="Requires LibreSSL",

Support encoding SCT data into an X.509 extension
Continued from #3461 since we've done everything but encoding them and it turns out that's more than a bit of a pain.

Since this has come up again in #4820: @alex didn't you run into some significant problems with SCT creation for reasons I no longer recall but hopefully you do?
tests/x509/test_x509_ext.py::TestExtension::test_not_an_oid tests/x509/test_x509_ext.py::TestExtension::test_critical_not_a_bool tests/x509/test_x509_ext.py::TestExtension::test_repr tests/x509/test_x509_ext.py::TestExtension::test_eq tests/x509/test_x509_ext.py::TestExtension::test_ne tests/x509/test_x509_ext.py::TestExtension::test_hash tests/x509/test_x509_ext.py::TestTLSFeature::test_not_enum_type tests/x509/test_x509_ext.py::TestTLSFeature::test_empty_list tests/x509/test_x509_ext.py::TestTLSFeature::test_repr tests/x509/test_x509_ext.py::TestTLSFeature::test_eq tests/x509/test_x509_ext.py::TestTLSFeature::test_ne tests/x509/test_x509_ext.py::TestTLSFeature::test_hash tests/x509/test_x509_ext.py::TestTLSFeature::test_iter tests/x509/test_x509_ext.py::TestTLSFeature::test_indexing tests/x509/test_x509_ext.py::TestUnrecognizedExtension::test_invalid_oid tests/x509/test_x509_ext.py::TestUnrecognizedExtension::test_eq tests/x509/test_x509_ext.py::TestUnrecognizedExtension::test_ne tests/x509/test_x509_ext.py::TestUnrecognizedExtension::test_repr tests/x509/test_x509_ext.py::TestUnrecognizedExtension::test_hash tests/x509/test_x509_ext.py::TestCertificateIssuer::test_iter_names tests/x509/test_x509_ext.py::TestCertificateIssuer::test_indexing tests/x509/test_x509_ext.py::TestCertificateIssuer::test_eq tests/x509/test_x509_ext.py::TestCertificateIssuer::test_ne tests/x509/test_x509_ext.py::TestCertificateIssuer::test_repr tests/x509/test_x509_ext.py::TestCertificateIssuer::test_get_values_for_type tests/x509/test_x509_ext.py::TestCertificateIssuer::test_hash tests/x509/test_x509_ext.py::TestCRLReason::test_invalid_reason_flags tests/x509/test_x509_ext.py::TestCRLReason::test_eq tests/x509/test_x509_ext.py::TestCRLReason::test_ne tests/x509/test_x509_ext.py::TestCRLReason::test_hash tests/x509/test_x509_ext.py::TestCRLReason::test_repr tests/x509/test_x509_ext.py::TestDeltaCRLIndicator::test_not_int tests/x509/test_x509_ext.py::TestDeltaCRLIndicator::test_eq tests/x509/test_x509_ext.py::TestDeltaCRLIndicator::test_ne tests/x509/test_x509_ext.py::TestDeltaCRLIndicator::test_repr tests/x509/test_x509_ext.py::TestDeltaCRLIndicator::test_hash tests/x509/test_x509_ext.py::TestInvalidityDate::test_invalid_invalidity_date tests/x509/test_x509_ext.py::TestInvalidityDate::test_eq tests/x509/test_x509_ext.py::TestInvalidityDate::test_ne tests/x509/test_x509_ext.py::TestInvalidityDate::test_repr tests/x509/test_x509_ext.py::TestInvalidityDate::test_hash tests/x509/test_x509_ext.py::TestNoticeReference::test_notice_numbers_not_all_int tests/x509/test_x509_ext.py::TestNoticeReference::test_notice_numbers_none tests/x509/test_x509_ext.py::TestNoticeReference::test_iter_input tests/x509/test_x509_ext.py::TestNoticeReference::test_repr tests/x509/test_x509_ext.py::TestNoticeReference::test_eq tests/x509/test_x509_ext.py::TestNoticeReference::test_ne tests/x509/test_x509_ext.py::TestNoticeReference::test_hash tests/x509/test_x509_ext.py::TestUserNotice::test_notice_reference_invalid tests/x509/test_x509_ext.py::TestUserNotice::test_notice_reference_none tests/x509/test_x509_ext.py::TestUserNotice::test_repr tests/x509/test_x509_ext.py::TestUserNotice::test_eq tests/x509/test_x509_ext.py::TestUserNotice::test_ne tests/x509/test_x509_ext.py::TestUserNotice::test_hash tests/x509/test_x509_ext.py::TestPolicyInformation::test_invalid_policy_identifier tests/x509/test_x509_ext.py::TestPolicyInformation::test_none_policy_qualifiers tests/x509/test_x509_ext.py::TestPolicyInformation::test_policy_qualifiers tests/x509/test_x509_ext.py::TestPolicyInformation::test_invalid_policy_identifiers tests/x509/test_x509_ext.py::TestPolicyInformation::test_iter_input tests/x509/test_x509_ext.py::TestPolicyInformation::test_repr tests/x509/test_x509_ext.py::TestPolicyInformation::test_eq tests/x509/test_x509_ext.py::TestPolicyInformation::test_ne tests/x509/test_x509_ext.py::TestPolicyInformation::test_hash tests/x509/test_x509_ext.py::TestCertificatePolicies::test_invalid_policies tests/x509/test_x509_ext.py::TestCertificatePolicies::test_iter_len tests/x509/test_x509_ext.py::TestCertificatePolicies::test_iter_input tests/x509/test_x509_ext.py::TestCertificatePolicies::test_repr tests/x509/test_x509_ext.py::TestCertificatePolicies::test_eq tests/x509/test_x509_ext.py::TestCertificatePolicies::test_ne tests/x509/test_x509_ext.py::TestCertificatePolicies::test_indexing tests/x509/test_x509_ext.py::TestCertificatePolicies::test_long_oid tests/x509/test_x509_ext.py::TestCertificatePolicies::test_hash tests/x509/test_x509_ext.py::TestCertificatePoliciesExtension::test_cps_uri_policy_qualifier tests/x509/test_x509_ext.py::TestCertificatePoliciesExtension::test_user_notice_with_notice_reference tests/x509/test_x509_ext.py::TestCertificatePoliciesExtension::test_user_notice_with_explicit_text tests/x509/test_x509_ext.py::TestCertificatePoliciesExtension::test_user_notice_no_explicit_text tests/x509/test_x509_ext.py::TestKeyUsage::test_key_agreement_false_encipher_decipher_true tests/x509/test_x509_ext.py::TestKeyUsage::test_properties_key_agreement_true tests/x509/test_x509_ext.py::TestKeyUsage::test_key_agreement_true_properties tests/x509/test_x509_ext.py::TestKeyUsage::test_key_agreement_false_properties tests/x509/test_x509_ext.py::TestKeyUsage::test_repr_key_agreement_false tests/x509/test_x509_ext.py::TestKeyUsage::test_repr_key_agreement_true tests/x509/test_x509_ext.py::TestKeyUsage::test_eq tests/x509/test_x509_ext.py::TestKeyUsage::test_ne tests/x509/test_x509_ext.py::TestKeyUsage::test_hash tests/x509/test_x509_ext.py::TestSubjectKeyIdentifier::test_properties tests/x509/test_x509_ext.py::TestSubjectKeyIdentifier::test_repr tests/x509/test_x509_ext.py::TestSubjectKeyIdentifier::test_eq tests/x509/test_x509_ext.py::TestSubjectKeyIdentifier::test_ne tests/x509/test_x509_ext.py::TestSubjectKeyIdentifier::test_hash tests/x509/test_x509_ext.py::TestAuthorityKeyIdentifier::test_authority_cert_issuer_not_generalname tests/x509/test_x509_ext.py::TestAuthorityKeyIdentifier::test_authority_cert_serial_number_not_integer tests/x509/test_x509_ext.py::TestAuthorityKeyIdentifier::test_authority_issuer_none_serial_not_none tests/x509/test_x509_ext.py::TestAuthorityKeyIdentifier::test_authority_issuer_not_none_serial_none tests/x509/test_x509_ext.py::TestAuthorityKeyIdentifier::test_authority_cert_serial_and_issuer_none tests/x509/test_x509_ext.py::TestAuthorityKeyIdentifier::test_authority_cert_serial_zero tests/x509/test_x509_ext.py::TestAuthorityKeyIdentifier::test_iter_input tests/x509/test_x509_ext.py::TestAuthorityKeyIdentifier::test_repr tests/x509/test_x509_ext.py::TestAuthorityKeyIdentifier::test_eq tests/x509/test_x509_ext.py::TestAuthorityKeyIdentifier::test_ne tests/x509/test_x509_ext.py::TestAuthorityKeyIdentifier::test_hash tests/x509/test_x509_ext.py::TestBasicConstraints::test_ca_not_boolean tests/x509/test_x509_ext.py::TestBasicConstraints::test_path_length_not_ca tests/x509/test_x509_ext.py::TestBasicConstraints::test_path_length_not_int tests/x509/test_x509_ext.py::TestBasicConstraints::test_path_length_negative tests/x509/test_x509_ext.py::TestBasicConstraints::test_repr tests/x509/test_x509_ext.py::TestBasicConstraints::test_hash tests/x509/test_x509_ext.py::TestBasicConstraints::test_eq tests/x509/test_x509_ext.py::TestBasicConstraints::test_ne tests/x509/test_x509_ext.py::TestExtendedKeyUsage::test_not_all_oids tests/x509/test_x509_ext.py::TestExtendedKeyUsage::test_iter_len tests/x509/test_x509_ext.py::TestExtendedKeyUsage::test_iter_input tests/x509/test_x509_ext.py::TestExtendedKeyUsage::test_repr tests/x509/test_x509_ext.py::TestExtendedKeyUsage::test_eq tests/x509/test_x509_ext.py::TestExtendedKeyUsage::test_ne tests/x509/test_x509_ext.py::TestExtendedKeyUsage::test_hash tests/x509/test_x509_ext.py::TestExtensions::test_no_extensions tests/x509/test_x509_ext.py::TestExtensions::test_one_extension tests/x509/test_x509_ext.py::TestExtensions::test_duplicate_extension tests/x509/test_x509_ext.py::TestExtensions::test_unsupported_critical_extension tests/x509/test_x509_ext.py::TestExtensions::test_unsupported_extension tests/x509/test_x509_ext.py::TestExtensions::test_no_extensions_get_for_class tests/x509/test_x509_ext.py::TestExtensions::test_unrecognized_extension_for_class tests/x509/test_x509_ext.py::TestExtensions::test_indexing tests/x509/test_x509_ext.py::TestExtensions::test_one_extension_get_for_class tests/x509/test_x509_ext.py::TestExtensions::test_repr tests/x509/test_x509_ext.py::TestBasicConstraintsExtension::test_ca_true_pathlen_6 tests/x509/test_x509_ext.py::TestBasicConstraintsExtension::test_path_length_zero tests/x509/test_x509_ext.py::TestBasicConstraintsExtension::test_ca_true_no_pathlen tests/x509/test_x509_ext.py::TestBasicConstraintsExtension::test_ca_false tests/x509/test_x509_ext.py::TestBasicConstraintsExtension::test_no_basic_constraints tests/x509/test_x509_ext.py::TestBasicConstraintsExtension::test_basic_constraint_not_critical tests/x509/test_x509_ext.py::TestSubjectKeyIdentifierExtension::test_subject_key_identifier tests/x509/test_x509_ext.py::TestSubjectKeyIdentifierExtension::test_no_subject_key_identifier tests/x509/test_x509_ext.py::TestSubjectKeyIdentifierExtension::test_from_rsa_public_key tests/x509/test_x509_ext.py::TestSubjectKeyIdentifierExtension::test_from_dsa_public_key tests/x509/test_x509_ext.py::TestSubjectKeyIdentifierExtension::test_invalid_bit_string_padding_from_public_key tests/x509/test_x509_ext.py::TestSubjectKeyIdentifierExtension::test_no_optional_params_allowed_from_public_key tests/x509/test_x509_ext.py::TestSubjectKeyIdentifierExtension::test_from_ec_public_key tests/x509/test_x509_ext.py::TestSubjectKeyIdentifierExtension::test_from_ed25519_public_key tests/x509/test_x509_ext.py::TestSubjectKeyIdentifierExtension::test_from_ed448_public_key tests/x509/test_x509_ext.py::TestKeyUsageExtension::test_no_key_usage tests/x509/test_x509_ext.py::TestKeyUsageExtension::test_all_purposes tests/x509/test_x509_ext.py::TestKeyUsageExtension::test_key_cert_sign_crl_sign tests/x509/test_x509_ext.py::TestDNSName::test_non_a_label tests/x509/test_x509_ext.py::TestDNSName::test_init tests/x509/test_x509_ext.py::TestDNSName::test_ne tests/x509/test_x509_ext.py::TestDNSName::test_hash tests/x509/test_x509_ext.py::TestDirectoryName::test_not_name tests/x509/test_x509_ext.py::TestDirectoryName::test_repr tests/x509/test_x509_ext.py::TestDirectoryName::test_eq tests/x509/test_x509_ext.py::TestDirectoryName::test_ne tests/x509/test_x509_ext.py::TestDirectoryName::test_hash tests/x509/test_x509_ext.py::TestRFC822Name::test_repr tests/x509/test_x509_ext.py::TestRFC822Name::test_equality tests/x509/test_x509_ext.py::TestRFC822Name::test_not_text tests/x509/test_x509_ext.py::TestRFC822Name::test_invalid_email tests/x509/test_x509_ext.py::TestRFC822Name::test_single_label tests/x509/test_x509_ext.py::TestRFC822Name::test_non_a_label tests/x509/test_x509_ext.py::TestRFC822Name::test_hash tests/x509/test_x509_ext.py::TestUniformResourceIdentifier::test_equality tests/x509/test_x509_ext.py::TestUniformResourceIdentifier::test_not_text tests/x509/test_x509_ext.py::TestUniformResourceIdentifier::test_no_parsed_hostname tests/x509/test_x509_ext.py::TestUniformResourceIdentifier::test_with_port tests/x509/test_x509_ext.py::TestUniformResourceIdentifier::test_non_a_label tests/x509/test_x509_ext.py::TestUniformResourceIdentifier::test_empty_hostname tests/x509/test_x509_ext.py::TestUniformResourceIdentifier::test_hash tests/x509/test_x509_ext.py::TestUniformResourceIdentifier::test_repr tests/x509/test_x509_ext.py::TestRegisteredID::test_not_oid tests/x509/test_x509_ext.py::TestRegisteredID::test_repr tests/x509/test_x509_ext.py::TestRegisteredID::test_eq tests/x509/test_x509_ext.py::TestRegisteredID::test_ne tests/x509/test_x509_ext.py::TestRegisteredID::test_hash tests/x509/test_x509_ext.py::TestIPAddress::test_not_ipaddress tests/x509/test_x509_ext.py::TestIPAddress::test_repr tests/x509/test_x509_ext.py::TestIPAddress::test_eq tests/x509/test_x509_ext.py::TestIPAddress::test_ne tests/x509/test_x509_ext.py::TestIPAddress::test_hash tests/x509/test_x509_ext.py::TestOtherName::test_invalid_args tests/x509/test_x509_ext.py::TestOtherName::test_repr tests/x509/test_x509_ext.py::TestOtherName::test_eq tests/x509/test_x509_ext.py::TestOtherName::test_ne tests/x509/test_x509_ext.py::TestOtherName::test_hash tests/x509/test_x509_ext.py::TestGeneralNames::test_get_values_for_type tests/x509/test_x509_ext.py::TestGeneralNames::test_iter_names tests/x509/test_x509_ext.py::TestGeneralNames::test_iter_input tests/x509/test_x509_ext.py::TestGeneralNames::test_indexing tests/x509/test_x509_ext.py::TestGeneralNames::test_invalid_general_names tests/x509/test_x509_ext.py::TestGeneralNames::test_repr tests/x509/test_x509_ext.py::TestGeneralNames::test_eq tests/x509/test_x509_ext.py::TestGeneralNames::test_ne tests/x509/test_x509_ext.py::TestGeneralNames::test_hash tests/x509/test_x509_ext.py::TestIssuerAlternativeName::test_get_values_for_type tests/x509/test_x509_ext.py::TestIssuerAlternativeName::test_iter_names tests/x509/test_x509_ext.py::TestIssuerAlternativeName::test_indexing tests/x509/test_x509_ext.py::TestIssuerAlternativeName::test_invalid_general_names tests/x509/test_x509_ext.py::TestIssuerAlternativeName::test_repr tests/x509/test_x509_ext.py::TestIssuerAlternativeName::test_eq tests/x509/test_x509_ext.py::TestIssuerAlternativeName::test_ne tests/x509/test_x509_ext.py::TestIssuerAlternativeName::test_hash tests/x509/test_x509_ext.py::TestRSAIssuerAlternativeNameExtension::test_uri tests/x509/test_x509_ext.py::TestCRLNumber::test_eq tests/x509/test_x509_ext.py::TestCRLNumber::test_ne tests/x509/test_x509_ext.py::TestCRLNumber::test_repr tests/x509/test_x509_ext.py::TestCRLNumber::test_invalid_number tests/x509/test_x509_ext.py::TestCRLNumber::test_hash tests/x509/test_x509_ext.py::TestSubjectAlternativeName::test_get_values_for_type tests/x509/test_x509_ext.py::TestSubjectAlternativeName::test_iter_names tests/x509/test_x509_ext.py::TestSubjectAlternativeName::test_indexing tests/x509/test_x509_ext.py::TestSubjectAlternativeName::test_invalid_general_names tests/x509/test_x509_ext.py::TestSubjectAlternativeName::test_repr tests/x509/test_x509_ext.py::TestSubjectAlternativeName::test_eq tests/x509/test_x509_ext.py::TestSubjectAlternativeName::test_ne tests/x509/test_x509_ext.py::TestSubjectAlternativeName::test_hash tests/x509/test_x509_ext.py::TestRSASubjectAlternativeNameExtension::test_dns_name tests/x509/test_x509_ext.py::TestRSASubjectAlternativeNameExtension::test_wildcard_dns_name tests/x509/test_x509_ext.py::TestRSASubjectAlternativeNameExtension::test_san_empty_hostname tests/x509/test_x509_ext.py::TestRSASubjectAlternativeNameExtension::test_san_wildcard_idna_dns_name tests/x509/test_x509_ext.py::TestRSASubjectAlternativeNameExtension::test_unsupported_gn tests/x509/test_x509_ext.py::TestRSASubjectAlternativeNameExtension::test_registered_id tests/x509/test_x509_ext.py::TestRSASubjectAlternativeNameExtension::test_uri tests/x509/test_x509_ext.py::TestRSASubjectAlternativeNameExtension::test_ipaddress tests/x509/test_x509_ext.py::TestRSASubjectAlternativeNameExtension::test_dirname tests/x509/test_x509_ext.py::TestRSASubjectAlternativeNameExtension::test_rfc822name tests/x509/test_x509_ext.py::TestRSASubjectAlternativeNameExtension::test_idna2003_invalid tests/x509/test_x509_ext.py::TestRSASubjectAlternativeNameExtension::test_unicode_rfc822_name_dns_name_uri tests/x509/test_x509_ext.py::TestRSASubjectAlternativeNameExtension::test_rfc822name_dnsname_ipaddress_directoryname_uri tests/x509/test_x509_ext.py::TestRSASubjectAlternativeNameExtension::test_invalid_rfc822name tests/x509/test_x509_ext.py::TestRSASubjectAlternativeNameExtension::test_other_name tests/x509/test_x509_ext.py::TestRSASubjectAlternativeNameExtension::test_certbuilder tests/x509/test_x509_ext.py::TestExtendedKeyUsageExtension::test_eku tests/x509/test_x509_ext.py::TestAccessDescription::test_invalid_access_method tests/x509/test_x509_ext.py::TestAccessDescription::test_invalid_access_location tests/x509/test_x509_ext.py::TestAccessDescription::test_valid_nonstandard_method tests/x509/test_x509_ext.py::TestAccessDescription::test_repr tests/x509/test_x509_ext.py::TestAccessDescription::test_eq tests/x509/test_x509_ext.py::TestAccessDescription::test_ne tests/x509/test_x509_ext.py::TestAccessDescription::test_hash tests/x509/test_x509_ext.py::TestPolicyConstraints::test_invalid_explicit_policy tests/x509/test_x509_ext.py::TestPolicyConstraints::test_invalid_inhibit_policy tests/x509/test_x509_ext.py::TestPolicyConstraints::test_both_none tests/x509/test_x509_ext.py::TestPolicyConstraints::test_repr tests/x509/test_x509_ext.py::TestPolicyConstraints::test_eq tests/x509/test_x509_ext.py::TestPolicyConstraints::test_ne tests/x509/test_x509_ext.py::TestPolicyConstraints::test_hash tests/x509/test_x509_ext.py::TestPolicyConstraintsExtension::test_inhibit_policy_mapping tests/x509/test_x509_ext.py::TestPolicyConstraintsExtension::test_require_explicit_policy tests/x509/test_x509_ext.py::TestAuthorityInformationAccess::test_invalid_descriptions tests/x509/test_x509_ext.py::TestAuthorityInformationAccess::test_iter_len tests/x509/test_x509_ext.py::TestAuthorityInformationAccess::test_iter_input tests/x509/test_x509_ext.py::TestAuthorityInformationAccess::test_repr tests/x509/test_x509_ext.py::TestAuthorityInformationAccess::test_eq tests/x509/test_x509_ext.py::TestAuthorityInformationAccess::test_ne tests/x509/test_x509_ext.py::TestAuthorityInformationAccess::test_indexing tests/x509/test_x509_ext.py::TestAuthorityInformationAccess::test_hash tests/x509/test_x509_ext.py::TestSubjectInformationAccess::test_invalid_descriptions tests/x509/test_x509_ext.py::TestSubjectInformationAccess::test_iter_len tests/x509/test_x509_ext.py::TestSubjectInformationAccess::test_iter_input tests/x509/test_x509_ext.py::TestSubjectInformationAccess::test_repr tests/x509/test_x509_ext.py::TestSubjectInformationAccess::test_eq tests/x509/test_x509_ext.py::TestSubjectInformationAccess::test_ne tests/x509/test_x509_ext.py::TestSubjectInformationAccess::test_indexing tests/x509/test_x509_ext.py::TestSubjectInformationAccess::test_hash tests/x509/test_x509_ext.py::TestSubjectInformationAccessExtension::test_sia tests/x509/test_x509_ext.py::TestAuthorityInformationAccessExtension::test_aia_ocsp_ca_issuers tests/x509/test_x509_ext.py::TestAuthorityInformationAccessExtension::test_aia_multiple_ocsp_ca_issuers tests/x509/test_x509_ext.py::TestAuthorityInformationAccessExtension::test_aia_ocsp_only tests/x509/test_x509_ext.py::TestAuthorityInformationAccessExtension::test_aia_ca_issuers_only tests/x509/test_x509_ext.py::TestAuthorityKeyIdentifierExtension::test_aki_keyid tests/x509/test_x509_ext.py::TestAuthorityKeyIdentifierExtension::test_aki_all_fields tests/x509/test_x509_ext.py::TestAuthorityKeyIdentifierExtension::test_aki_no_keyid tests/x509/test_x509_ext.py::TestAuthorityKeyIdentifierExtension::test_from_certificate tests/x509/test_x509_ext.py::TestAuthorityKeyIdentifierExtension::test_from_issuer_subject_key_identifier tests/x509/test_x509_ext.py::TestNameConstraints::test_ipaddress_wrong_type tests/x509/test_x509_ext.py::TestNameConstraints::test_ipaddress_allowed_type tests/x509/test_x509_ext.py::TestNameConstraints::test_invalid_permitted_subtrees tests/x509/test_x509_ext.py::TestNameConstraints::test_invalid_excluded_subtrees tests/x509/test_x509_ext.py::TestNameConstraints::test_no_subtrees tests/x509/test_x509_ext.py::TestNameConstraints::test_permitted_none tests/x509/test_x509_ext.py::TestNameConstraints::test_excluded_none tests/x509/test_x509_ext.py::TestNameConstraints::test_iter_input tests/x509/test_x509_ext.py::TestNameConstraints::test_repr tests/x509/test_x509_ext.py::TestNameConstraints::test_eq tests/x509/test_x509_ext.py::TestNameConstraints::test_ne tests/x509/test_x509_ext.py::TestNameConstraints::test_hash tests/x509/test_x509_ext.py::TestNameConstraintsExtension::test_permitted_excluded tests/x509/test_x509_ext.py::TestNameConstraintsExtension::test_permitted tests/x509/test_x509_ext.py::TestNameConstraintsExtension::test_permitted_with_leading_period tests/x509/test_x509_ext.py::TestNameConstraintsExtension::test_excluded_with_leading_period tests/x509/test_x509_ext.py::TestNameConstraintsExtension::test_permitted_excluded_with_ips tests/x509/test_x509_ext.py::TestNameConstraintsExtension::test_single_ip_netmask tests/x509/test_x509_ext.py::TestNameConstraintsExtension::test_invalid_netmask tests/x509/test_x509_ext.py::TestNameConstraintsExtension::test_certbuilder tests/x509/test_x509_ext.py::TestDistributionPoint::test_distribution_point_full_name_not_general_names tests/x509/test_x509_ext.py::TestDistributionPoint::test_distribution_point_relative_name_not_name tests/x509/test_x509_ext.py::TestDistributionPoint::test_distribution_point_full_and_relative_not_none tests/x509/test_x509_ext.py::TestDistributionPoint::test_crl_issuer_not_general_names tests/x509/test_x509_ext.py::TestDistributionPoint::test_reason_not_reasonflags tests/x509/test_x509_ext.py::TestDistributionPoint::test_reason_not_frozenset tests/x509/test_x509_ext.py::TestDistributionPoint::test_disallowed_reasons tests/x509/test_x509_ext.py::TestDistributionPoint::test_reason_only tests/x509/test_x509_ext.py::TestDistributionPoint::test_eq tests/x509/test_x509_ext.py::TestDistributionPoint::test_ne tests/x509/test_x509_ext.py::TestDistributionPoint::test_iter_input tests/x509/test_x509_ext.py::TestDistributionPoint::test_repr tests/x509/test_x509_ext.py::TestDistributionPoint::test_hash tests/x509/test_x509_ext.py::TestFreshestCRL::test_invalid_distribution_points tests/x509/test_x509_ext.py::TestFreshestCRL::test_iter_len tests/x509/test_x509_ext.py::TestFreshestCRL::test_iter_input tests/x509/test_x509_ext.py::TestFreshestCRL::test_repr tests/x509/test_x509_ext.py::TestFreshestCRL::test_eq tests/x509/test_x509_ext.py::TestFreshestCRL::test_ne tests/x509/test_x509_ext.py::TestFreshestCRL::test_hash tests/x509/test_x509_ext.py::TestFreshestCRL::test_indexing tests/x509/test_x509_ext.py::TestCRLDistributionPoints::test_invalid_distribution_points tests/x509/test_x509_ext.py::TestCRLDistributionPoints::test_iter_len tests/x509/test_x509_ext.py::TestCRLDistributionPoints::test_iter_input tests/x509/test_x509_ext.py::TestCRLDistributionPoints::test_repr tests/x509/test_x509_ext.py::TestCRLDistributionPoints::test_eq tests/x509/test_x509_ext.py::TestCRLDistributionPoints::test_ne tests/x509/test_x509_ext.py::TestCRLDistributionPoints::test_hash tests/x509/test_x509_ext.py::TestCRLDistributionPoints::test_indexing tests/x509/test_x509_ext.py::TestCRLDistributionPointsExtension::test_fullname_and_crl_issuer tests/x509/test_x509_ext.py::TestCRLDistributionPointsExtension::test_relativename_and_crl_issuer tests/x509/test_x509_ext.py::TestCRLDistributionPointsExtension::test_fullname_crl_issuer_reasons tests/x509/test_x509_ext.py::TestCRLDistributionPointsExtension::test_all_reasons tests/x509/test_x509_ext.py::TestCRLDistributionPointsExtension::test_single_reason tests/x509/test_x509_ext.py::TestCRLDistributionPointsExtension::test_crl_issuer_only tests/x509/test_x509_ext.py::TestCRLDistributionPointsExtension::test_crl_empty_hostname tests/x509/test_x509_ext.py::TestFreshestCRLExtension::test_vector tests/x509/test_x509_ext.py::TestOCSPNoCheckExtension::test_nocheck tests/x509/test_x509_ext.py::TestOCSPNoCheckExtension::test_eq tests/x509/test_x509_ext.py::TestOCSPNoCheckExtension::test_hash tests/x509/test_x509_ext.py::TestOCSPNoCheckExtension::test_ne tests/x509/test_x509_ext.py::TestOCSPNoCheckExtension::test_repr tests/x509/test_x509_ext.py::TestInhibitAnyPolicy::test_not_int tests/x509/test_x509_ext.py::TestInhibitAnyPolicy::test_negative_int tests/x509/test_x509_ext.py::TestInhibitAnyPolicy::test_repr tests/x509/test_x509_ext.py::TestInhibitAnyPolicy::test_eq tests/x509/test_x509_ext.py::TestInhibitAnyPolicy::test_ne tests/x509/test_x509_ext.py::TestInhibitAnyPolicy::test_hash tests/x509/test_x509_ext.py::TestInhibitAnyPolicyExtension::test_inhibit_any_policy tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_vectors[crl_idp_fullname_indirect_crl.pem-expected0] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_vectors[crl_idp_fullname_only.pem-expected1] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_vectors[crl_idp_fullname_only_aa.pem-expected2] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_vectors[crl_idp_fullname_only_user.pem-expected3] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_vectors[crl_idp_only_ca.pem-expected4] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_vectors[crl_idp_reasons_only.pem-expected5] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_vectors[crl_idp_relative_user_all_reasons.pem-expected6] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_vectors[crl_idp_relativename_only.pem-expected7] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_invalid_init[TypeError-False-False-False-False-notafrozenset-None-None] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_invalid_init[TypeError-False-False-False-False-only_some_reasons1-None-None] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_invalid_init[ValueError-False-False-False-False-only_some_reasons2-None-None] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_invalid_init[ValueError-False-False-False-False-only_some_reasons3-None-None] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_invalid_init[TypeError-notabool-False-False-False-None-None-None] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_invalid_init[TypeError-False-notabool-False-False-None-None-None] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_invalid_init[TypeError-False-False-notabool-False-None-None-None] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_invalid_init[TypeError-False-False-False-notabool-None-None-None] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_invalid_init[ValueError-True-True-False-False-None-None-None] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_invalid_init[ValueError-False-False-True-True-None-None-None] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_invalid_init[ValueError-False-False-False-False-None-None-None] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_repr tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_eq tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_ne tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_hash tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_generate[idp0] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_generate[idp1] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_generate[idp2] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_generate[idp3] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_generate[idp4] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_generate[idp5] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_generate[idp6] tests/x509/test_x509_ext.py::TestIssuingDistributionPointExtension::test_generate[idp7] tests/x509/test_x509_ext.py::TestPrecertPoisonExtension::test_load tests/x509/test_x509_ext.py::TestPrecertPoisonExtension::test_generate tests/x509/test_x509_ext.py::TestPrecertPoisonExtension::test_eq tests/x509/test_x509_ext.py::TestPrecertPoisonExtension::test_hash tests/x509/test_x509_ext.py::TestPrecertPoisonExtension::test_ne tests/x509/test_x509_ext.py::TestPrecertPoisonExtension::test_repr tests/x509/test_x509_ext.py::TestSignedCertificateTimestamps::test_eq tests/x509/test_x509_ext.py::TestSignedCertificateTimestamps::test_ne tests/x509/test_x509_ext.py::TestSignedCertificateTimestamps::test_hash tests/x509/test_x509_ext.py::TestPrecertificateSignedCertificateTimestampsExtension::test_init tests/x509/test_x509_ext.py::TestPrecertificateSignedCertificateTimestampsExtension::test_repr tests/x509/test_x509_ext.py::TestPrecertificateSignedCertificateTimestampsExtension::test_eq tests/x509/test_x509_ext.py::TestPrecertificateSignedCertificateTimestampsExtension::test_ne tests/x509/test_x509_ext.py::TestPrecertificateSignedCertificateTimestampsExtension::test_hash tests/x509/test_x509_ext.py::TestPrecertificateSignedCertificateTimestampsExtension::test_simple tests/x509/test_x509_ext.py::TestInvalidExtension::test_invalid_certificate_policies_data tests/x509/test_x509_ext.py::TestOCSPNonce::test_non_bytes tests/x509/test_x509_ext.py::TestOCSPNonce::test_eq tests/x509/test_x509_ext.py::TestOCSPNonce::test_ne tests/x509/test_x509_ext.py::TestOCSPNonce::test_repr tests/x509/test_x509_ext.py::TestOCSPNonce::test_hash tests/x509/test_x509_ext.py::test_all_extension_oid_members_have_names_defined
tests/x509/test_x509_ext.py::TestPrecertificateSignedCertificateTimestampsExtension::test_generate