"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/TestHttpdConf.py" between
mod_md-2.4.2.tar.gz and mod_md-2.4.4.tar.gz

About: mod_md is an Apache module that adds Let's Encrypt (ACME) support.

TestHttpdConf.py  (mod_md-2.4.2):TestHttpdConf.py  (mod_md-2.4.4)
skipping to change at line 76 skipping to change at line 76
if os.path.isfile(self.path): if os.path.isfile(self.path):
os.remove(self.path) os.remove(self.path)
def _add_line(self, line): def _add_line(self, line):
open(self.path, "a").write(line + "\n") open(self.path, "a").write(line + "\n")
def add_line(self, line): def add_line(self, line):
self._add_line(line) self._add_line(line)
def add_drive_mode(self, mode): def add_drive_mode(self, mode):
self._add_line(" MDRenewMode %s\n" % mode) self._add_line(" MDRenewMode \"%s\"\n" % mode)
def add_renew_window(self, window): def add_renew_window(self, window):
self._add_line(" MDRenewWindow %s\n" % window) self._add_line(" MDRenewWindow %s\n" % window)
def add_private_key(self, key_type, key_params): def add_private_key(self, key_type, key_params):
self._add_line(" MDPrivateKeys %s %s\n" % (key_type, " ".join(map(lambd a p: str(p), key_params)))) self._add_line(" MDPrivateKeys %s %s\n" % (key_type, " ".join(map(lambd a p: str(p), key_params))))
def add_admin(self, email): def add_admin(self, email):
self._add_line(" ServerAdmin mailto:%s\n\n" % email) self._add_line(" ServerAdmin mailto:%s\n" % email)
def add_md(self, domains): def add_md(self, domains):
self._add_line(" MDomain %s\n\n" % " ".join(domains)) dlist = " ".join(domains) # without quotes
self._add_line(f" MDomain {dlist}\n")
def start_md(self, domains): def start_md(self, domains):
self._add_line(" <MDomain %s>\n" % " ".join(domains)) dlist = " ".join([f"\"{d}\"" for d in domains]) # with quotes, #257
self._add_line(f" <MDomain {dlist}>\n")
def start_md2(self, domains): def start_md2(self, domains):
self._add_line(" <MDomainSet %s>\n" % " ".join(domains)) self._add_line(" <MDomainSet %s>\n" % " ".join(domains))
def end_md(self): def end_md(self):
self._add_line(" </MDomain>\n") self._add_line(" </MDomain>\n")
def end_md2(self): def end_md2(self):
self._add_line(" </MDomainSet>\n") self._add_line(" </MDomainSet>\n")
def add_must_staple(self, mode): def add_must_staple(self, mode):
self._add_line(" MDMustStaple %s\n" % mode) self._add_line(" MDMustStaple %s\n" % mode)
def add_ca_challenges(self, type_list): def add_ca_challenges(self, type_list):
self._add_line(" MDCAChallenges %s\n" % " ".join(type_list)) self._add_line(" MDCAChallenges %s\n" % " ".join(type_list))
def add_http_proxy(self, url): def add_http_proxy(self, url):
self._add_line(" MDHttpProxy %s\n" % url) self._add_line(" MDHttpProxy %s\n" % url)
def add_require_ssl(self, mode): def add_require_ssl(self, mode):
self._add_line(" MDRequireHttps %s\n" % mode) self._add_line(" MDRequireHttps \"%s\"\n" % mode)
def add_notify_cmd(self, cmd): def add_notify_cmd(self, cmd):
self._add_line(" MDNotifyCmd %s\n" % cmd) self._add_line(" MDNotifyCmd %s\n" % cmd)
def add_message_cmd(self, cmd): def add_message_cmd(self, cmd):
self._add_line(" MDMessageCmd %s\n" % cmd) self._add_line(" MDMessageCmd %s\n" % cmd)
def add_dns01_cmd(self, cmd): def add_dns01_cmd(self, cmd):
self._add_line(" MDChallengeDns01 %s\n" % cmd) self._add_line(" MDChallengeDns01 \"%s\"\n" % cmd)
def add_certificate(self, cert_file, key_file): def add_certificate(self, cert_file, key_file):
if TestEnv.get_ssl_module() == "ssl": if TestEnv.get_ssl_module() == "ssl":
self._add_line(f""" self._add_line(f"""
SSLCertificateFile {cert_file} SSLCertificateFile {cert_file}
SSLCertificateKeyFile {key_file} SSLCertificateKeyFile {key_file}
""") """)
elif TestEnv.get_ssl_module() == "tls": elif TestEnv.get_ssl_module() == "tls":
self._add_line(f""" self._add_line(f"""
TLSCertificate {cert_file} {key_file} TLSCertificate {cert_file} {key_file}
 End of changes. 6 change blocks. 
6 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)