From c1b02cc8a5a5536e63131b3045eb79b391021e17 Mon Sep 17 00:00:00 2001
From: Jose Plana
Date: Fri, 15 Feb 2019 14:31:16 +0100
Subject: [PATCH 1/8] Allow uploading csr along with certificates
---
lemur/certificates/schemas.py | 1 +
.../certificates/certificate/upload.tpl.html | 13 +++++++++++++
lemur/tests/test_certificates.py | 1 +
3 files changed, 15 insertions(+)
diff --git a/lemur/certificates/schemas.py b/lemur/certificates/schemas.py
index 78217de0..5795e71a 100644
--- a/lemur/certificates/schemas.py
+++ b/lemur/certificates/schemas.py
@@ -255,6 +255,7 @@ class CertificateUploadInputSchema(CertificateCreationSchema):
private_key = fields.String()
body = fields.String(required=True)
chain = fields.String(missing=None, allow_none=True)
+ csr = fields.String(required=False,valudate=validators.csr)
destinations = fields.Nested(AssociatedDestinationSchema, missing=[], many=True)
notifications = fields.Nested(AssociatedNotificationSchema, missing=[], many=True)
diff --git a/lemur/static/app/angular/certificates/certificate/upload.tpl.html b/lemur/static/app/angular/certificates/certificate/upload.tpl.html
index c3339051..bf897a60 100644
--- a/lemur/static/app/angular/certificates/certificate/upload.tpl.html
+++ b/lemur/static/app/angular/certificates/certificate/upload.tpl.html
@@ -62,6 +62,19 @@
a valid certificate.
+