diff --git a/lemur/certificates/views.py b/lemur/certificates/views.py index b6ddd5ce..432e6dbd 100644 --- a/lemur/certificates/views.py +++ b/lemur/certificates/views.py @@ -357,6 +357,7 @@ class CertificatesList(AuthenticatedResource): self.reqparse.add_argument('replacements', type=list, default=[], location='json') self.reqparse.add_argument('validityStart', type=str, location='json') # TODO validate self.reqparse.add_argument('validityEnd', type=str, location='json') # TODO validate + self.reqparse.add_argument('validityYears', type=int, location='json') # TODO validate self.reqparse.add_argument('authority', type=valid_authority, location='json', required=True) self.reqparse.add_argument('description', type=str, location='json') self.reqparse.add_argument('country', type=str, location='json', required=True) diff --git a/lemur/plugins/lemur_verisign/plugin.py b/lemur/plugins/lemur_verisign/plugin.py index d4d18eca..ef0ba0e6 100644 --- a/lemur/plugins/lemur_verisign/plugin.py +++ b/lemur/plugins/lemur_verisign/plugin.py @@ -82,6 +82,12 @@ def process_options(options): data['specificEndDate'] = str(end_date) data['validityPeriod'] = period + elif options.get('validityYears'): + if options['validityYears'] in [1, 2]: + data['validityPeriod'] = str(options['validityYears']) + 'Y' + else: + raise Exception("Verisign issued certificates cannot exceed two years in validity") + return data diff --git a/lemur/static/app/angular/certificates/certificate/tracking.tpl.html b/lemur/static/app/angular/certificates/certificate/tracking.tpl.html index e56541f0..54176eae 100644 --- a/lemur/static/app/angular/certificates/certificate/tracking.tpl.html +++ b/lemur/static/app/angular/certificates/certificate/tracking.tpl.html @@ -79,24 +79,32 @@ tooltip="If no date is selected Lemur attempts to issue a 2 year certificate"> Validity Range - -
-
-
- - - - -
+
+ +
+ + - or - + +
+
+ + + +
-