crypto: fix being unable to save with private key
This commit is contained in:
parent
b0ddc6a8c0
commit
2a78d2d0a0
|
@ -34,7 +34,6 @@ class CertificateKeyPairForm(forms.ModelForm):
|
||||||
password=None,
|
password=None,
|
||||||
backend=default_backend(),
|
backend=default_backend(),
|
||||||
)
|
)
|
||||||
load_pem_x509_certificate(key_data.encode("utf-8"), default_backend())
|
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise forms.ValidationError("Unable to load private key.")
|
raise forms.ValidationError("Unable to load private key.")
|
||||||
return key_data
|
return key_data
|
||||||
|
|
Reference in New Issue