Added VERISIGN_INTERMEDIATE_<authority> parameter

When using the VERISIGN_PRODUCT_<authority> Parameter one also has to add this parameter:
VERISIGN_INTERMEDIATE_<authority> = """ <PEM-String of Issuing CA for this certificate Type>""" 
While doing this, I also added code, so the external_id field is filled with data from CA-Answer
This commit is contained in:
sirferl 2020-02-17 12:40:36 +01:00 committed by GitHub
parent 1815c89970
commit 3fd0d3e141
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -209,7 +209,7 @@ class VerisignIssuerPlugin(IssuerPlugin):
response = self.session.post(url, data=data) response = self.session.post(url, data=data)
try: try:
cert = handle_response(response.content)["Response"]["Certificate"] response_dict = handle_response(response.content)
except KeyError: except KeyError:
metrics.send( metrics.send(
"verisign_create_certificate_error", "verisign_create_certificate_error",
@ -221,8 +221,12 @@ class VerisignIssuerPlugin(IssuerPlugin):
extra={"common_name": issuer_options.get("common_name", "")} extra={"common_name": issuer_options.get("common_name", "")}
) )
raise Exception(f"Error with Verisign: {response.content}") raise Exception(f"Error with Verisign: {response.content}")
# TODO add external id # DONE: TODO add external id
return cert, current_app.config.get("VERISIGN_INTERMEDIATE"), None authority = issuer_options.get("authority").name.upper()
cert = response_dict['Response']['Certificate']
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
@staticmethod @staticmethod
def create_authority(options): def create_authority(options):