Merge pull request #2917 from sirferl/master

New variable VERISIGN_PRODUCT_(authority.name)
This commit is contained in:
Hossein Shafagh 2020-02-16 15:38:42 -08:00 committed by GitHub
commit 0d76690091
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -98,10 +98,14 @@ def process_options(options):
:param options: :param options:
:return: dict or valid verisign options :return: dict or valid verisign options
""" """
# if there is a config variable with VERISIGN_PRODUCT_<upper(authority.name)> take the value as Cert product-type
# else default to "Server", to be compatoible with former versions
authority = options.get("authority").name.upper()
product_type = current_app.config.get("VERISIGN_PRODUCT_{0}".format(authority), "Server")
data = { data = {
"challenge": get_psuedo_random_string(), "challenge": get_psuedo_random_string(),
"serverType": "Apache", "serverType": "Apache",
"certProductType": "Server", "certProductType": product_type,
"firstName": current_app.config.get("VERISIGN_FIRST_NAME"), "firstName": current_app.config.get("VERISIGN_FIRST_NAME"),
"lastName": current_app.config.get("VERISIGN_LAST_NAME"), "lastName": current_app.config.get("VERISIGN_LAST_NAME"),
"signatureAlgorithm": "sha256WithRSAEncryption", "signatureAlgorithm": "sha256WithRSAEncryption",