moving the 2 year validity issue to the Verisign plugin, and address it there

This commit is contained in:
Hossein Shafagh
2019-01-29 16:17:08 -08:00
parent c47fa0f9a2
commit 48ad20faca
3 changed files with 17 additions and 10 deletions

View File

@ -16,9 +16,7 @@ def convert_validity_years(data):
data['validity_start'] = now.isoformat()
end = now.replace(years=+int(data['validity_years']))
# some CAs want to see exactly two years validity, and not two years plus one day, as is the case currently
# 1/25/2019 + 2 years ==> 1/25/2019 (two years and 1 day extra, violating the 2 year's limit)
end = end.replace(days=-1)
if not current_app.config.get('LEMUR_ALLOW_WEEKEND_EXPIRATION', True):
if is_weekend(end):
end = end.replace(days=-2)