Commit dfc56771 authored by Adrien Dorsaz's avatar Adrien Dorsaz

config_factory: Let's Encrypt staging API refuse to create account with...

config_factory: Let's Encrypt staging API refuse to create account with contact linked to "@example.com" domain.
parent bcda00ea
...@@ -13,6 +13,7 @@ DNSTTL = os.getenv("GITLABCI_DNSTTL", "10") ...@@ -13,6 +13,7 @@ DNSTTL = os.getenv("GITLABCI_DNSTTL", "10")
TSIGKEYNAME = os.getenv("GITLABCI_TSIGKEYNAME") TSIGKEYNAME = os.getenv("GITLABCI_TSIGKEYNAME")
TSIGKEYVALUE = os.getenv("GITLABCI_TSIGKEYVALUE") TSIGKEYVALUE = os.getenv("GITLABCI_TSIGKEYVALUE")
TSIGALGORITHM = os.getenv("GITLABCI_TSIGALGORITHM") TSIGALGORITHM = os.getenv("GITLABCI_TSIGALGORITHM")
CONTACT = os.getenv("GITLABCI_CONTACT")
# generate simple config # generate simple config
def generate_config(): def generate_config():
...@@ -32,7 +33,11 @@ def generate_config(): ...@@ -32,7 +33,11 @@ def generate_config():
parser["acmednstiny"]["AccountKeyFile"] = account_key.name parser["acmednstiny"]["AccountKeyFile"] = account_key.name
parser["acmednstiny"]["CSRFile"] = domain_csr.name parser["acmednstiny"]["CSRFile"] = domain_csr.name
parser["acmednstiny"]["ACMEDirectory"] = ACMEDIRECTORY parser["acmednstiny"]["ACMEDirectory"] = ACMEDIRECTORY
parser["acmednstiny"]["Contacts"] = "mailto:mail@example.com" if (CONTACT != null
and CONTACT != ""):
parser["acmednstiny"]["Contacts"] = "mailto:{0}".format(CONTACT)
else:
del parser["acmednstiny"]["Contacts"]
parser["TSIGKeyring"]["KeyName"] = TSIGKEYNAME parser["TSIGKeyring"]["KeyName"] = TSIGKEYNAME
parser["TSIGKeyring"]["KeyValue"] = TSIGKEYVALUE parser["TSIGKeyring"]["KeyValue"] = TSIGKEYVALUE
parser["TSIGKeyring"]["Algorithm"] = TSIGALGORITHM parser["TSIGKeyring"]["Algorithm"] = TSIGALGORITHM
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment