diff --git a/lemur/plugins/lemur_entrust/plugin.py b/lemur/plugins/lemur_entrust/plugin.py index 75658305..315da8bd 100644 --- a/lemur/plugins/lemur_entrust/plugin.py +++ b/lemur/plugins/lemur_entrust/plugin.py @@ -19,22 +19,24 @@ def log_status_code(r, *args, **kwargs): """ metrics.send("ENTRUST_status_code_{}".format(r.status_code), "counter", 1) + def determine_end_date(end_date): """ Determine appropriate end date :param end_date: :return: validity_end """ - #ENTRUST only allows 13 months of max certificate duration + # ENTRUST only allows 13 months of max certificate duration max_validity_end = arrow.utcnow().shift(years=1, months=+1).format('YYYY-MM-DD') if not end_date: - end_date = max_validity_end + end_date = max_validity_end if end_date > max_validity_end: end_date = max_validity_end return end_date + def process_options(options): """ Processes and maps the incoming issuer options to fields/options that