pki.tests.test_models.test_certificate_extensionsΒΆ
Tests for the parsing and handling of certificate extensions.
FunctionsΒΆ
|
Test that the KeyUsage extension is parsed and stored correctly in the database. |
|
Test that the SubjectAlternativeName extension is parsed and stored correctly in the database. |
|
Test that the IssuerAlternativeName extension is parsed and stored correctly in the database. |
|
Test that the BasicConstraints extension is parsed and stored correctly in the database. |
Test that the AuthorityKeyIdentifier extension is parsed and stored correctly in the database. |
|
|
Test that the SubjectKeyIdentifier extension is parsed and stored correctly in the database. |
Test that policy extensions with multiple qualifier entries are parsed and stored correctly in the database. |
|
|
Test that the ExtendedKeyUsage extension is parsed and stored correctly in the database. |
|
Test that the NameConstraints extension is parsed and stored correctly in the database. |
Test that the AIA extension is parsed and stored correctly in the database. |
|
Test that the SIA extension is parsed and stored correctly in the database. |
|
|
Test that the Inhibit anyPolicy extension is parsed and stored correctly in the database. |
|
Test that the Inhibit anyPolicy extension is parsed and stored correctly in the database. |
|
Test that the freshest crl extension is parsed and stored correctly in the database. |
|
Test that all extensions are deleted when the certificate is deleted. |
|
Test that all extensions are deleted when the certificate is deleted. |
Test that extensions that are shared are not deleted. |
|
|
Test that the basic certificate is deleted without exceptions. |
Module ContentsΒΆ
- pki.tests.test_models.test_certificate_extensions.test_key_usage_ext(self_signed_cert_with_ext)[source]ΒΆ
Test that the KeyUsage extension is parsed and stored correctly in the database.
- Parameters:
self_signed_cert_with_ext (cryptography.x509.Certificate)
- Return type:
None
- pki.tests.test_models.test_certificate_extensions.test_san_ext(self_signed_cert_with_ext)[source]ΒΆ
Test that the SubjectAlternativeName extension is parsed and stored correctly in the database.
- Parameters:
self_signed_cert_with_ext (cryptography.x509.Certificate)
- Return type:
None
- pki.tests.test_models.test_certificate_extensions.test_ian_ext(self_signed_cert_with_ext)[source]ΒΆ
Test that the IssuerAlternativeName extension is parsed and stored correctly in the database.
- Parameters:
self_signed_cert_with_ext (cryptography.x509.Certificate)
- Return type:
None
- pki.tests.test_models.test_certificate_extensions.test_basic_constraints_ext(self_signed_cert_with_ext)[source]ΒΆ
Test that the BasicConstraints extension is parsed and stored correctly in the database.
- Parameters:
self_signed_cert_with_ext (cryptography.x509.Certificate)
- Return type:
None
- pki.tests.test_models.test_certificate_extensions.test_authority_key_identifier_ext(self_signed_cert_with_ext)[source]ΒΆ
Test that the AuthorityKeyIdentifier extension is parsed and stored correctly in the database.
- Parameters:
self_signed_cert_with_ext (cryptography.x509.Certificate)
- Return type:
None
- pki.tests.test_models.test_certificate_extensions.test_subject_key_identifier_ext(self_signed_cert_with_ext)[source]ΒΆ
Test that the SubjectKeyIdentifier extension is parsed and stored correctly in the database.
- Parameters:
self_signed_cert_with_ext (cryptography.x509.Certificate)
- Return type:
None
- pki.tests.test_models.test_certificate_extensions.test_certificate_policies_multiple_entries(self_signed_cert_with_ext)[source]ΒΆ
Test that policy extensions with multiple qualifier entries are parsed and stored correctly in the database.
- Parameters:
self_signed_cert_with_ext (cryptography.x509.Certificate)
- Return type:
None
- pki.tests.test_models.test_certificate_extensions.test_extended_key_usage_ext(self_signed_cert_with_ext)[source]ΒΆ
Test that the ExtendedKeyUsage extension is parsed and stored correctly in the database.
- Parameters:
self_signed_cert_with_ext (cryptography.x509.Certificate)
- Return type:
None
- pki.tests.test_models.test_certificate_extensions.test_name_constraints_ext(self_signed_cert_with_ext)[source]ΒΆ
Test that the NameConstraints extension is parsed and stored correctly in the database.
- Parameters:
self_signed_cert_with_ext (cryptography.x509.Certificate)
- Return type:
None
- pki.tests.test_models.test_certificate_extensions.test_authority_information_access_extension(self_signed_cert_with_ext)[source]ΒΆ
Test that the AIA extension is parsed and stored correctly in the database.
- Parameters:
self_signed_cert_with_ext (cryptography.x509.Certificate)
- Return type:
None
- pki.tests.test_models.test_certificate_extensions.test_subject_information_access_extension(self_signed_cert_with_ext)[source]ΒΆ
Test that the SIA extension is parsed and stored correctly in the database.
- Parameters:
self_signed_cert_with_ext (cryptography.x509.Certificate)
- Return type:
None
- pki.tests.test_models.test_certificate_extensions.test_inhibit_any_policy(self_signed_cert_with_ext)[source]ΒΆ
Test that the Inhibit anyPolicy extension is parsed and stored correctly in the database.
- Parameters:
self_signed_cert_with_ext (cryptography.x509.Certificate)
- Return type:
None
- pki.tests.test_models.test_certificate_extensions.test_policy_constraints(self_signed_cert_with_ext)[source]ΒΆ
Test that the Inhibit anyPolicy extension is parsed and stored correctly in the database.
- Parameters:
self_signed_cert_with_ext (cryptography.x509.Certificate)
- Return type:
None
- pki.tests.test_models.test_certificate_extensions.test_freshest_crl(self_signed_cert_with_ext)[source]ΒΆ
Test that the freshest crl extension is parsed and stored correctly in the database.
- Parameters:
self_signed_cert_with_ext (cryptography.x509.Certificate)
- Return type:
None
- pki.tests.test_models.test_certificate_extensions.test_extension_deletion(self_signed_cert_with_ext, self_signed_cert_basic)[source]ΒΆ
Test that all extensions are deleted when the certificate is deleted.
- Parameters:
self_signed_cert_with_ext (cryptography.x509.Certificate)
- Return type:
None
- pki.tests.test_models.test_certificate_extensions.test_extension_deletion(self_signed_cert_with_ext)[source]ΒΆ
Test that all extensions are deleted when the certificate is deleted.
- Parameters:
self_signed_cert_with_ext (cryptography.x509.Certificate)
- Return type:
None
- pki.tests.test_models.test_certificate_extensions.test_multi_extension_deletion(self_signed_cert_with_ext, self_signed_cert_basic)[source]ΒΆ
Test that extensions that are shared are not deleted.
(if there is another certificate with those exact extension values)
- Parameters:
self_signed_cert_with_ext (cryptography.x509.Certificate)
self_signed_cert_basic (tuple[pki.models.certificate.CertificateModel, cryptography.x509.Certificate])
- Return type:
None
- pki.tests.test_models.test_certificate_extensions.test_basic_certificate_deletion(self_signed_cert_basic)[source]ΒΆ
Test that the basic certificate is deleted without exceptions.
- Parameters:
self_signed_cert_basic (tuple[pki.models.certificate.CertificateModel, cryptography.x509.Certificate])
- Return type:
None