Update plugin.py

This commit is contained in:
sirferl 2020-02-17 19:04:20 +01:00 committed by GitHub
parent ed3472d029
commit e75df1ddc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -221,10 +221,11 @@ class VerisignIssuerPlugin(IssuerPlugin):
extra={"common_name": issuer_options.get("common_name", "")}
)
raise Exception(f"Error with Verisign: {response.content}")
# DONE: TODO add external id
authority = issuer_options.get("authority").name.upper()
cert = response_dict['Response']['Certificate']
external_id = response_dict['Response']['Transaction_ID']
external_id = None
if 'Transaction_ID' in response_dict['Response'].keys():
external_id = response_dict['Response']['Transaction_ID']
chain = current_app.config.get("VERISIGN_INTERMEDIATE_{0}".format(authority), current_app.config.get("VERISIGN_INTERMEDIATE"))
return cert, chain, external_id