crypto: fix import_certificate checking private key as certificate
closes #3713 Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
eccbf08cd8
commit
93e90f8f50
|
@ -38,9 +38,9 @@ class Command(BaseCommand):
|
|||
try:
|
||||
serializer.validate_certificate_data(keypair.certificate_data)
|
||||
if keypair.key_data != "":
|
||||
serializer.validate_certificate_data(keypair.key_data)
|
||||
serializer.validate_key_data(keypair.key_data)
|
||||
except ValidationError as exc:
|
||||
self.stderr.write(exc)
|
||||
self.stderr.write(str(exc))
|
||||
sys_exit(1)
|
||||
if dirty:
|
||||
keypair.save()
|
||||
|
|
Reference in New Issue