Repository navigation
Conversation
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
| try: | ||
| return [issuer.pk for issuer in certificate_chain(obj)] | ||
| except ValueError as exc: | ||
| raise serializers.ValidationError(str(exc)) from exc |
| try: | ||
| csr = build_external_csr(ca.credential, profile, content, allow_ca=True) | ||
| except ValueError as exc: | ||
| raise ValidationError(str(exc)) from exc |
| except (EstClientError, CmpClientError) as exc: | ||
| raise UpstreamError from exc | ||
| except ValueError as exc: | ||
| raise ValidationError(str(exc)) from exc |
| try: | ||
| ca = AutoGenPki.enable_auto_gen_pki(form.cleaned_data['key_type']) | ||
| except ValueError as exc: | ||
| raise ValidationError(str(exc)) from exc |
| else: | ||
| CaRolloverService.cancel_rollover(rollover) | ||
| except ValueError as exc: | ||
| raise Conflict(str(exc)) from exc |
| try: | ||
| certificates = [certificate, *certificate_chain(certificate)] if include_chain else [certificate] | ||
| except ValueError as exc: | ||
| raise ValidationError(str(exc)) from exc |
| cert, _ = CertificateGenerator.create_root_ca(cn='Unused') | ||
| ca = CaModel.create_keyless_ca(unique_name='unused', certificate_obj=cert) | ||
| pk = ca.pk | ||
| assert api.delete(f'/api/cas/{pk}/').status_code == 204 |
| parser = x509.load_pem_x509_crl if download_encoding == 'pem' else x509.load_der_x509_crl | ||
| assert parser(result.content).issuer == issuing_ca_instance['cert'].subject | ||
| assert api.get(f'/api/crls/{pk}/download/?encoding=invalid').status_code == 400 | ||
| assert api.delete(f'/api/crls/{pk}/').status_code == 204 |
|
|
||
| from management.models import SecurityConfig | ||
| from management.models.audit_log import AuditLog | ||
| from pki.models import CaModel, CertificateModel, CrlModel |
|
|
||
| import pytest | ||
| from cryptography import x509 | ||
| from cryptography.hazmat.primitives import hashes, serialization |
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Legal