mirror of
https://github.com/certbot/certbot.git
synced 2026-08-03 08:03:10 +02:00
Merge branch 'master' into reverter
Conflicts: letsencrypt/client/apache/parser.py letsencrypt/client/augeas_configurator.py
This commit is contained in:
@@ -255,11 +255,32 @@ class ApacheParser(object):
|
|||||||
"/augeas/load/Httpd/incl [. ='%s']" % filepath)
|
"/augeas/load/Httpd/incl [. ='%s']" % filepath)
|
||||||
if not inc_test:
|
if not inc_test:
|
||||||
# Load up files
|
# Load up files
|
||||||
# self.aug.add_transform("Httpd.lns",
|
# This doesn't seem to work on TravisCI
|
||||||
# self.httpd_incl, None, self.httpd_excl)
|
# self.aug.add_transform("Httpd.lns", [filepath])
|
||||||
self._add_httpd_transform(filepath)
|
self._add_httpd_transform(filepath)
|
||||||
self.aug.load()
|
self.aug.load()
|
||||||
|
|
||||||
|
def _add_httpd_transform(self, incl):
|
||||||
|
"""Add a transform to Augeas.
|
||||||
|
|
||||||
|
This function will correctly add a transform to augeas
|
||||||
|
The existing augeas.add_transform in python doesn't seem to work for
|
||||||
|
Travis CI as it loads in libaugeas.so.0.10.0
|
||||||
|
|
||||||
|
:param str incl: filepath to include for transform
|
||||||
|
|
||||||
|
"""
|
||||||
|
last_include = self.aug.match("/augeas/load/Httpd/incl [last()]")
|
||||||
|
if last_include:
|
||||||
|
# Insert a new node immediately after the last incl
|
||||||
|
self.aug.insert(last_include[0], "incl", False)
|
||||||
|
self.aug.set("/augeas/load/Httpd/incl[last()]", incl)
|
||||||
|
# On first use... must load lens and add file to incl
|
||||||
|
else:
|
||||||
|
# Augeas uses base 1 indexing... insert at beginning...
|
||||||
|
self.aug.set("/augeas/load/Httpd/lens", "Httpd.lns")
|
||||||
|
self.aug.set("/augeas/load/Httpd/incl", incl)
|
||||||
|
|
||||||
def standardize_excl(self):
|
def standardize_excl(self):
|
||||||
"""Standardize the excl arguments for the Httpd lens in Augeas.
|
"""Standardize the excl arguments for the Httpd lens in Augeas.
|
||||||
|
|
||||||
@@ -292,19 +313,6 @@ class ApacheParser(object):
|
|||||||
|
|
||||||
self.aug.load()
|
self.aug.load()
|
||||||
|
|
||||||
def _add_httpd_transform(self, incl):
|
|
||||||
"""Add a transform to Augeas.
|
|
||||||
|
|
||||||
This function will correctly add a transform to augeas
|
|
||||||
The existing augeas.add_transform in python is broken.
|
|
||||||
|
|
||||||
:param str incl: TODO
|
|
||||||
|
|
||||||
"""
|
|
||||||
last_include = self.aug.match("/augeas/load/Httpd/incl [last()]")
|
|
||||||
self.aug.insert(last_include[0], "incl", False)
|
|
||||||
self.aug.set("/augeas/load/Httpd/incl[last()]", incl)
|
|
||||||
|
|
||||||
def _set_locations(self, ssl_options):
|
def _set_locations(self, ssl_options):
|
||||||
"""Set default location for directives.
|
"""Set default location for directives.
|
||||||
|
|
||||||
|
|||||||
@@ -17,13 +17,16 @@ class IAuthenticator(zope.interface.Interface):
|
|||||||
:param str domain: Domain for which challenge preferences are sought.
|
:param str domain: Domain for which challenge preferences are sought.
|
||||||
|
|
||||||
:returns: list of strings with the most preferred challenges first.
|
:returns: list of strings with the most preferred challenges first.
|
||||||
|
If a type is not specified, it means the Authenticator cannot
|
||||||
|
perform the challenge.
|
||||||
:rtype: list
|
:rtype: list
|
||||||
|
|
||||||
"""
|
"""
|
||||||
def perform(chall_list):
|
def perform(chall_list):
|
||||||
"""Perform the given challenge.
|
"""Perform the given challenge.
|
||||||
|
|
||||||
:param list chall_list: List of challenge types defined in client.py
|
:param list chall_list: List of namedtuple types defined in
|
||||||
|
challenge_util.py. DvsniChall...ect..
|
||||||
|
|
||||||
:returns: List of responses
|
:returns: List of responses
|
||||||
If the challenge cant be completed...
|
If the challenge cant be completed...
|
||||||
|
|||||||
Reference in New Issue
Block a user