mirror of
https://github.com/certbot/certbot.git
synced 2026-08-02 19:42:02 +02:00
Update both main VA and remote VA to use the provided DNS server (#8467)
This commit is contained in:
@@ -149,10 +149,10 @@ class ACMEServer(object):
|
|||||||
[pebble_path, '-config', pebble_config_path, '-dnsserver', dns_server, '-strict'],
|
[pebble_path, '-config', pebble_config_path, '-dnsserver', dns_server, '-strict'],
|
||||||
env=environ)
|
env=environ)
|
||||||
|
|
||||||
# pebble_ocsp_server is imported here and not at the top of module in order to avoid a useless
|
# pebble_ocsp_server is imported here and not at the top of module in order to avoid a
|
||||||
# ImportError, in the case where cryptography dependency is too old to support ocsp, but
|
# useless ImportError, in the case where cryptography dependency is too old to support ocsp,
|
||||||
# Boulder is used instead of Pebble, so pebble_ocsp_server is not used. This is the typical
|
# but Boulder is used instead of Pebble, so pebble_ocsp_server is not used. This is the
|
||||||
# situation of integration-certbot-oldest tox testenv.
|
# typical situation of integration-certbot-oldest tox testenv.
|
||||||
from certbot_integration_tests.utils import pebble_ocsp_server
|
from certbot_integration_tests.utils import pebble_ocsp_server
|
||||||
self._launch_process([sys.executable, pebble_ocsp_server.__file__])
|
self._launch_process([sys.executable, pebble_ocsp_server.__file__])
|
||||||
|
|
||||||
@@ -178,11 +178,12 @@ class ACMEServer(object):
|
|||||||
|
|
||||||
if self._dns_server:
|
if self._dns_server:
|
||||||
# Change Boulder config to use the provided DNS server
|
# Change Boulder config to use the provided DNS server
|
||||||
with open(join(instance_path, 'test/config/va.json'), 'r') as file_h:
|
for suffix in ["", "-remote-a", "-remote-b"]:
|
||||||
config = json.loads(file_h.read())
|
with open(join(instance_path, 'test/config/va{}.json'.format(suffix)), 'r') as f:
|
||||||
config['va']['dnsResolvers'] = [self._dns_server]
|
config = json.loads(f.read())
|
||||||
with open(join(instance_path, 'test/config/va.json'), 'w') as file_h:
|
config['va']['dnsResolvers'] = [self._dns_server]
|
||||||
file_h.write(json.dumps(config, indent=2, separators=(',', ': ')))
|
with open(join(instance_path, 'test/config/va{}.json'.format(suffix)), 'w') as f:
|
||||||
|
f.write(json.dumps(config, indent=2, separators=(',', ': ')))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Launch the Boulder server
|
# Launch the Boulder server
|
||||||
|
|||||||
Reference in New Issue
Block a user