diff --git a/src/cryptography/x509/extensions.py b/src/cryptography/x509/extensions.py
--- a/src/cryptography/x509/extensions.py
+++ b/src/cryptography/x509/extensions.py
@@ -1054,8 +1054,11 @@ def __repr__(self):
             encipher_only = self.encipher_only
             decipher_only = self.decipher_only
         except ValueError:
-            encipher_only = None
-            decipher_only = None
+            # Users found None confusing because even though encipher/decipher
+            # have no meaning unless key_agreement is true, to construct an
+            # instance of the class you still need to pass False.
+            encipher_only = False
+            decipher_only = False
 
         return ("<KeyUsage(digital_signature={0.digital_signature}, "
                 "content_commitment={0.content_commitment}, "

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
@@ -896,8 +896,8 @@ def test_repr_key_agreement_false(self):
         assert repr(ku) == (
             "<KeyUsage(digital_signature=True, content_commitment=True, key_en"
             "cipherment=False, data_encipherment=False, key_agreement=False, k"
-            "ey_cert_sign=True, crl_sign=False, encipher_only=None, decipher_o"
-            "nly=None)>"
+            "ey_cert_sign=True, crl_sign=False, encipher_only=False, decipher_"
+            "only=False)>"
         )
 
     def test_repr_key_agreement_true(self):

Doc mistake in example.
Example for extentions [here](https://cryptography.io/en/latest/x509/reference/#cryptography.x509.Certificate.extensions) contains errors:

` <Extension(oid=<ObjectIdentifier(oid=2.5.29.15, name=keyUsage)>, critical=True, value=<KeyUsage(digital_signature=False, content_commitment=False, key_encipherment=False, data_encipherment=False, key_agreement=False, key_cert_sign=True, crl_sign=True, encipher_only=None, decipher_only=None)>`

Last two parameters should also be False, as per documentation. Otherwise certificate creation fails. 

This is perhaps a bit confusing but is not a bug in the docs. The `__repr__` shown there says None because in this case `encipher_only` and `decipher_only` have no meaning when `key_agreement` is not `True`. We represent this in the repr by saying `None`, but `None` is not allowed in the `__init__` of the class itself.

Since this is confusing and also causes a bug to manifest if you attempt to use this structure in certificate creation we should probably revisit this (and likely enforce boolean as well).
If the example is failing to build, then this example is wrong in my book, so please correct for the benefit of those who will try to use it in future.
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_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::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_init_deprecated 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_idna 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_idna_no_port tests/x509/test_x509_ext.py::TestUniformResourceIdentifier::test_idna_with_port tests/x509/test_x509_ext.py::TestUniformResourceIdentifier::test_empty_hostname tests/x509/test_x509_ext.py::TestUniformResourceIdentifier::test_query_and_fragment 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::TestPrecertificateSignedCertificateTimestampsExtension::test_init tests/x509/test_x509_ext.py::TestPrecertificateSignedCertificateTimestampsExtension::test_repr tests/x509/test_x509_ext.py::TestPrecertificateSignedCertificateTimestampsExtension::test_skips_scts_if_unsupported 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::TestKeyUsage::test_repr_key_agreement_false