Skip to content

Commit ee6e687

Browse files
orangepizzaatombrellaRobert DaileyTomoyuki-GHadferrand
authored
fast-foward to upstream (#1)
* Implements support for ECDSA keys. Fixes certbot#2163. Thanks to @pahrohfit and @Tomoyuki-GH for previous efforts to implement suport for this. Co-Authored-By: Robert Dailey <[email protected]> Co-Authored-By: Tomoyuki-GH <[email protected]> * Handle unexpected key type migration. (certbot#8435) Fixes certbot#8365 This PR adds a control when `certbot certonly` or `certbot run` are called for a certificate that already exists and would eventually be replaced. As described in certbot#8365, this control is here to ensure that the user will not modify the key type of their certificate (eg. ECDSA to RSA) without an explicit approval (set explicitly `--cert-name` and `--key-type`), since RSA is the default if not specified. * Handle unexpected key type migration. * Update certbot-ci/certbot_integration_tests/certbot_tests/test_main.py Co-authored-by: Brad Warren <[email protected]> * Add certbot renew --key-type test (certbot#8447) * Test certbot renew --key-type * Fix typo * Use better asserts. Added notes to style guide. (certbot#8451) * Add --dns-server option in run_acme_server (certbot#7722) Fixes certbot#7717 This PR adds a `--dns-server` option to the `run_acme_server` test tool, in order to provide an arbitrary DNS server to Pebble or Boulder for the integration tests. I also take this occasion to make `run_acme_server` a real CLI tool using argparse, and set the `--server-type` (default `pebble`) option as well. * Set --dns-server flag in run_acme_server * Default to pebble * Add documentation * Configure also Boulder * cli: improve Obtaining/Renewing wording (certbot#8395) * cli: improve Obtaining/Renewing wording * dont use logger, and use new phrasing * .display_util.notify: dont wrap As this function is supposed to be an analogue for print, we do not want it to wrap by default. * Add certbot-dns-rfc2136 integration testing (certbot#8448) * tests: add certbot-dns-rfc2136 integration tests * dont use 'with' form of socket.socket fixes py2 crash * address some feedback: - conftest: make DNS server a global resource - conftest: add dns_xdist parameter into node config - conftest: add --dns-server=bind flag - conftest: if configured, point the ACME server to the DNS server - dnsserver: make it sort-of compatible with xdist (future-proofing) - context: parameterize dns-rfc2136 credentials file (future proofing) - context: reduce dns-rfc2136 propagation time to speed up tests - tox: add a integration-dns-rfc2136 target - rfc2136: add a test/zone for subdelegation - rfc2136: skip tests if no DNS server is configured * try add integration-dns-rfc2136 to CI * mock recursive dns via RPZ * update --dns-server args and tox.ini args * address more feedback: - dns_server: rename rfc2136 creds file to .tpl - dns_server: dont vary dns server port, instead we will vary zone names (certbot#8455) - dns_server: log error if bind9 fails to stop cleanly - dns_server: replace assert with raise - context: remove redundant _worker_id - context: remove redundant cleanup override - context: fix seek/flush in credentials context manager - context: rename skip_if_no_server -> ...bind_server - context: add newline EOF * conftest: document _setup_primary_node sideeffects * ci: rfc2136-integration from standard->nightly * fix _stop_bind (function was renamed to stop) * ignore errors from shutil.rmtree during cleanup * dns_server: check for crash while polling * remove --dry-run from rfc2136 test * import print_function * certbot-ci: fix py2 crash in dns_server * Read files as binary in crypto_util for crypto.load_certificate. (certbot#8371) * Flesh out ECDSA documentation (certbot#8464) * Changelog tweaks. * Add ECDSA documentation * Fix typo * Add Python 3.9 support and tests (certbot#8460) Fixes certbot#8134. * Test on Python 3.9. * Mention Python 3.9 support in changelog. * s/\( *'Pro.*3\.\)8\(',\)/\18\2\n\19\2/ * undo changes to tox.ini * Move more tests to Python 3.9 * Update PyYAML and packages which pinned it back * Upgrade typed-ast * Use <= to "pin" dnspython * Fix lint by telling pylint it cannot be trusted * Disable mypy on RFC plugin * add comment about <= support * Fix link typo in README (certbot#8476) * nginx: fix Unicode crash on Python 2 (certbot#8480) * nginx: fix py2 unicode sandwich The nginx parser would crash when saving configuraitons containing Unicode, because py2's `str` type does not support Unicode. This change fixes that crash by ensuring that a string type supporting Unicode is used in both Python 2 and Python 3. * nginx: add unicode to the integration test config * update CHANGELOG * Update changelog for 1.10.0 release * Release 1.10.0 * Add contents to certbot/CHANGELOG.md for next version * Bump version to 1.11.0 * Fix changelog typo (certbot#8488) * fix changelog typo * remove empty entry * Deprecate certbot-auto and remove tests * Completely deprecate certbot-auto * DeaDeactivate centos6/oraclelinux6 tests * Remove tests assets * Remove another test * Revert "Remove tests assets" This reverts commit e603afe. * Undo certbot-auto changes and remove centos6 tests * Don't deprecate certbot-auto quite yet * Remove centos6 test farm tests * undo changes to test farm test scripts * Deprecate certbot-auto and remove tests * Completely deprecate certbot-auto * DeaDeactivate centos6/oraclelinux6 tests * Remove tests assets * Remove another test * Revert "Remove tests assets" This reverts commit e603afe. (cherry picked from commit ff3a07d) * Undo certbot-auto changes and remove centos6 tests * Don't deprecate certbot-auto quite yet * Remove centos6 test farm tests * undo changes to test farm test scripts (cherry picked from commit e5113d5) * Fix add deprecated argument (certbot#8500) Fixes certbot#8495. To further explain the problem here, `modify_kwargs_for_default_detection` as called in `add` is simplistic and doesn't always work. See certbot#6164 for one other example. In this case, were bitten by the code https://github.com/certbot/certbot/blob/d1e7404358c05734aaf436ef3c9d709029d62b09/certbot/certbot/_internal/cli/helpful.py#L393-L395 The action used for deprecated arguments isn't in `ZERO_ARG_ACTIONS` so it assumes that all deprecated flags take one parameter. Rather than trying to fix this function (which I think can only realistically be fixed by certbot#4493), I took the approach that was previously used in `HelpfulArgumentParser.add_deprecated_argument` of bypassing this extra logic entirely. I adapted that function to now call `HelpfulArgumentParser.add` as well for consistency and to make testing easier. * Rename deprecated arg action class * Skip extra parsing for deprecated arguments * Add back test of --manual-public-ip-logging-ok * Add changelog entry * Fix changelog typo (certbot#8497) Co-authored-by: Adrien Ferrand <[email protected]> * Fix add deprecated argument (certbot#8500) (certbot#8501) Fixes certbot#8495. To further explain the problem here, `modify_kwargs_for_default_detection` as called in `add` is simplistic and doesn't always work. See certbot#6164 for one other example. In this case, were bitten by the code https://github.com/certbot/certbot/blob/d1e7404358c05734aaf436ef3c9d709029d62b09/certbot/certbot/_internal/cli/helpful.py#L393-L395 The action used for deprecated arguments isn't in `ZERO_ARG_ACTIONS` so it assumes that all deprecated flags take one parameter. Rather than trying to fix this function (which I think can only realistically be fixed by certbot#4493), I took the approach that was previously used in `HelpfulArgumentParser.add_deprecated_argument` of bypassing this extra logic entirely. I adapted that function to now call `HelpfulArgumentParser.add` as well for consistency and to make testing easier. * Rename deprecated arg action class * Skip extra parsing for deprecated arguments * Add back test of --manual-public-ip-logging-ok * Add changelog entry (cherry picked from commit 5f73274) * Update changelog for 1.10.1 release * Release 1.10.1 * Add contents to certbot/CHANGELOG.md for next version * Bump version to 1.11.0 * cli: clean up `certbot renew` summary (certbot#8503) * cli: clean up `certbot renew` summary - Unduplicate output which was being sent to both stdout and stderr - Don't use IDisplay.notification to buffer output - Remove big "DRY RUN" guards above and below, instead change language to "renewal" or "simulated renewal" - Reword "Attempting to renew cert ... produced an unexpected error" to be more concise. * add newline to docstring Co-authored-by: ohemorange <[email protected]> Co-authored-by: ohemorange <[email protected]> * Update both main VA and remote VA to use the provided DNS server (certbot#8467) * dns-google: improve credentials error message (certbot#8482) This adds a 'Error parsing credentials file ...' wrapper to any errors raised inside certbot-dns-google's usage of oauth2client, to make it obvious to the user where the problem lies. * Removed some unused imports. (certbot#8424) These were not annotated as something that should be ignored, and the test-suite passes with these changes. * snap: disable the "user site-packages directory" (certbot#8509) Although Certbot is a classic snap, it shouldn't load Python code from the host system. This change prevents packages being loaded from the "user site-packages directory" (PEP-370). i.e. Certbot will no longer load DNS plugins installed via `pip install --user certbot-dns-*`. * add coverage testing to dns-rfc2136 integration (certbot#8469) * add coverage testing to dns-rfc2136 integration * add coverage rule for certbot/* as well * Completely deprecate certbot-auto (certbot#8489) Fixes certbot#8296 * Completely deprecate certbot-auto * Add changelog * Deprecate support for Python 2 (certbot#8491) Fixes certbot#8388 * Deprecate support for Python 2 * Ignore deprecation warning * Update certbot/CHANGELOG.md Co-authored-by: Brad Warren <[email protected]> * Add reminders to update documentation (certbot#8518) * Add documentation PR checklist item. * Update contributing doc * Avoid --system-site-packages during the snap build by preparing a venv with pipstrap that already includes wheel (certbot#8445) This PR proposes an alternative configuration for the snap build that avoid the need to use `--system-site-package` when constructing the virtual environment in the snap. The rationale of `--system-site-package` was that by default, snapcraft creates a virtual environment without `wheel` installed in it. However we need it to build the wheels like `cryptography` on ARM architectures. Sadly there is not way to instruct snapcraft to install some build dependencies in the virtual environment before it kicks in the build phase itself, without overriding that entire phase (which is possible with `parts.override-build`). The alternative proposed here is to not override the entire build part, but just add some preparatory steps that will be done before the main actions handled by the `python` snap plugin. To do so, I take advantage of the `--upgrade` flag available for the `venv` module in Python 3. This allows to reuse a preexisting virtual environment, and upgrade its component. Adding a flag to the `venv` call is possible in snapcraft, thanks to the `SNAPCRAFT_PYTHON_VENV_ARGS` environment variable (and it is already used to set the `--system-site-package`). Given `SNAPCRAFT_PYTHON_VENV_ARGS` set to `--upgrade` , we configure the build phase as follows: * create the virtual environment ourselves in the expected place (`SNAPCRAFT_PART_INSTALL`) * leverage `tools/pipstrap.py` to install `setuptools`, `pip`, and of course, `wheel` * let the standard build operations kick in with a call to `snapcraftctl build`: at that point the `--upgrade` flag will be appended to the standard virtual environment creation, reusing our crafted venv instead of creating a new one. This approach has also the advantage to invoke `pipstrap.py` as it is done for the other deployable artifacts, and for the PR validations, reducing risks of shifts between the various deployment methods. * Deprecate support of Apache 2.2 in certbot-apache (certbot#8516) Fixes certbot#8462 * Deprecate support of Apache 2.2 in certbot-apache * Add a changelog * Add finish_release flags and CLI parsing (certbot#8522) * Setup a timeout to the remote snap build process (certbot#8484) This PR adds a `--timeout` flag to `tools/snap/build_remote.py` in order to fail the process if the time execution reaches the provided timeout. It is set to 5h30 on the relevant Azure job, while the job itself has a timeout of 6h managed on Azure side. This allows a slightly better output for these jobs when the snapcraft build stales for any reason. * add OS package warning (certbot#8533) * Make our test farm tests instances self-destruct (certbot#8536) * remove unused user data * have instance self-destruct in case cleanup fails * correct kwargs * fix param order * remove CentOS 6 cruft from test farm tests (certbot#8534) * Add path to certbot executable in debug log (certbot#8538) * Enable again build isolation with proper pinning of build dependencies (certbot#8443) Fixes certbot#8256 First let's sum up the problem to solve. We disabled the build isolation available in pip>=19 because it could potential break certbot build without a control on our side. Basically builds are not reproductible. Indeed the build isolation triggers build of PEP-517 enabled transitive dependencies (like `cryptography`) with the build dependencies defined in their `pyproject.toml`. For `cryptography` in particular these requirements include `setuptools>=40.6.0`, and quite logically pip will install the latest version of `setuptools` for the build. And when `setuptools` broke with the version 50, our build did the same. But disabling the build isolation is not a long term solution, as more and more project will migrate on this approach and it basically provides a lot of benefit in how dependencies are built. The ideal solution would be to be able to apply version constraints on our side on the build dependencies, in order to pin `setuptools` for instance, and decide precisely when we upgrade to a newer version. However for now pip does not provide a mechanism for that (like a `--build-constraint` flag or propagation of existing `--constraint` flag). Until I saw pypa/pip#9081 and pypa/pip#8439. Apart the fact that pypa/pip#9081 shows that pip maintainers are working on this issue, it explains how pip works regarding PEP-517 and infers which workaround can be used to still pin the build dependencies. It turns out that pip invokes itself in each build isolation to install the build dependencies. It means that even if some flags (like `--constraint`) are not explicitly passed to the pip sub call, the global environment remains, in particular the environment variables. Thus it is known that every pip flag can alternatively be set by environment variable using the following pattern for the variable name: `PIP_[FLAG_NAME_UPPERCASE]`. So for `--constraint`, it is `PIP_CONSTRAINT`. And so you can pass a constraint file to the pip sub call through that mechanism. I made some tests with a constraint file containing pinning for `setuptools`: indeed under isolation zone, the constraint file has been honored and the provided pinned version has been used to build the dependencies (I tested it with `cryptography`). Finally this PR takes advantage of this mechanism, by setting `PIP_CONSTRAINT` to `pip_install`, the snap building process, the Dockerfiles and the windows installer building process. I also extracted out the requirements of the new `pipstrap.py` to be reusable in these various build processes. * Use workaround to fix build requirements in build isolation, and renable build isolation * Clean imports in pipstrap * Externalize pipstrap reqs to be reusable * Inject pipstrap constraints during pip_install * Update docker build * Update snapcraft build * Prepare installer build * Fix pipstrap constraints in snap build * Add back --no-build-cache option in Docker images build * Update snap/snapcraft.yaml * Use proper flags with pip Co-authored-by: Brad Warren <[email protected]> * Added certbot-ci to lint section. Silenced and fixed linting warnings. (certbot#8450) * remove reference to letsencrypt(-auto) (certbot#8531) * Clean up certbot-auto docs (certbot#8532) Fixes certbot#8519. I left the `certbot-auto` docs in `install.rst` to avoid breaking links and to help propagate information about our changes there. I moved it closer to the bottom of the doc though since I think our documentation about OS packages and Docker is more helpful to most people. * clean up certbot-auto docs * add more info to changelog * remove more certbot-auto references Co-authored-by: Mads Jensen <[email protected]> Co-authored-by: Robert Dailey <[email protected]> Co-authored-by: Tomoyuki-GH <[email protected]> Co-authored-by: Adrien Ferrand <[email protected]> Co-authored-by: Brad Warren <[email protected]> Co-authored-by: alexzorin <[email protected]> Co-authored-by: Brad Warren <[email protected]> Co-authored-by: ohemorange <[email protected]> Co-authored-by: Adrien Ferrand <[email protected]> Co-authored-by: alexzorin <[email protected]> Co-authored-by: osirisinferi <[email protected]>
1 parent 517d60c commit ee6e687

File tree

170 files changed

+2247
-1837
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+2247
-1837
lines changed

.azure-pipelines/templates/jobs/extended-tests-jobs.yml

+16-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
- name: IMAGE_NAME
55
value: ubuntu-18.04
66
- name: PYTHON_VERSION
7-
value: 3.8
7+
value: 3.9
88
- group: certbot-common
99
strategy:
1010
matrix:
@@ -14,6 +14,9 @@ jobs:
1414
linux-py37:
1515
PYTHON_VERSION: 3.7
1616
TOXENV: py37
17+
linux-py38:
18+
PYTHON_VERSION: 3.8
19+
TOXENV: py38
1720
linux-py37-nopin:
1821
PYTHON_VERSION: 3.7
1922
TOXENV: py37
@@ -62,10 +65,20 @@ jobs:
6265
PYTHON_VERSION: 3.8
6366
TOXENV: integration
6467
ACME_SERVER: boulder-v2
68+
linux-boulder-v1-py39-integration:
69+
PYTHON_VERSION: 3.9
70+
TOXENV: integration
71+
ACME_SERVER: boulder-v1
72+
linux-boulder-v2-py39-integration:
73+
PYTHON_VERSION: 3.9
74+
TOXENV: integration
75+
ACME_SERVER: boulder-v2
6576
nginx-compat:
6677
TOXENV: nginx_compat
67-
le-auto-oraclelinux6:
68-
TOXENV: le_auto_oraclelinux6
78+
linux-integration-rfc2136:
79+
IMAGE_NAME: ubuntu-18.04
80+
PYTHON_VERSION: 3.8
81+
TOXENV: integration-dns-rfc2136
6982
docker-dev:
7083
TOXENV: docker_dev
7184
macos-farmtest-apache2:

.azure-pipelines/templates/jobs/packaging-jobs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ jobs:
144144
git config --global user.name "$(Build.RequestedFor)"
145145
mkdir -p ~/.local/share/snapcraft/provider/launchpad
146146
cp $(credentials.secureFilePath) ~/.local/share/snapcraft/provider/launchpad/credentials
147-
python3 tools/snap/build_remote.py ALL --archs ${ARCHS}
147+
python3 tools/snap/build_remote.py ALL --archs ${ARCHS} --timeout 19800
148148
displayName: Build snaps
149149
- script: |
150150
set -e

.azure-pipelines/templates/jobs/standard-tests-jobs.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
jobs:
22
- job: test
33
variables:
4-
PYTHON_VERSION: 3.8
4+
PYTHON_VERSION: 3.9
55
strategy:
66
matrix:
77
macos-py27:
88
IMAGE_NAME: macOS-10.15
99
PYTHON_VERSION: 2.7
1010
TOXENV: py27
11-
macos-py38:
11+
macos-py39:
1212
IMAGE_NAME: macOS-10.15
13-
PYTHON_VERSION: 3.8
14-
TOXENV: py38
13+
PYTHON_VERSION: 3.9
14+
TOXENV: py39
1515
windows-py36:
1616
IMAGE_NAME: vs2017-win2016
1717
PYTHON_VERSION: 3.6
@@ -38,10 +38,10 @@ jobs:
3838
IMAGE_NAME: ubuntu-18.04
3939
PYTHON_VERSION: 3.6
4040
TOXENV: py36
41-
linux-py38-cover:
41+
linux-py39-cover:
4242
IMAGE_NAME: ubuntu-18.04
43-
PYTHON_VERSION: 3.8
44-
TOXENV: py38-cover
43+
PYTHON_VERSION: 3.9
44+
TOXENV: py39-cover
4545
linux-py37-lint:
4646
IMAGE_NAME: ubuntu-18.04
4747
PYTHON_VERSION: 3.7
@@ -58,9 +58,9 @@ jobs:
5858
apache-compat:
5959
IMAGE_NAME: ubuntu-18.04
6060
TOXENV: apache_compat
61-
le-auto-centos6:
61+
le-modification:
6262
IMAGE_NAME: ubuntu-18.04
63-
TOXENV: le_auto_centos6
63+
TOXENV: modification
6464
apacheconftest:
6565
IMAGE_NAME: ubuntu-18.04
6666
PYTHON_VERSION: 2.7

AUTHORS.md

+2
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ Authors
154154
* [Luca Olivetti](https://github.com/olivluca)
155155
* [Luke Rogers](https://github.com/lukeroge)
156156
* [Maarten](https://github.com/mrtndwrd)
157+
* [Mads Jensen](https://github.com/atombrella)
157158
* [Maikel Martens](https://github.com/krukas)
158159
* [Malte Janduda](https://github.com/MalteJ)
159160
* [Mantas Mikulėnas](https://github.com/grawity)
@@ -213,6 +214,7 @@ Authors
213214
* [Richard Barnes](https://github.com/r-barnes)
214215
* [Richard Panek](https://github.com/kernelpanek)
215216
* [Robert Buchholz](https://github.com/rbu)
217+
* [Robert Dailey](https://github.com/pahrohfit)
216218
* [Robert Habermann](https://github.com/frennkie)
217219
* [Robert Xiao](https://github.com/nneonneo)
218220
* [Roland Shoemaker](https://github.com/rolandshoemaker)

acme/acme/__init__.py

+7
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,10 @@
2020
# preserved (acme.jose.* is josepy.*)
2121
if mod == 'josepy' or mod.startswith('josepy.'):
2222
sys.modules['acme.' + mod.replace('josepy', 'jose', 1)] = sys.modules[mod]
23+
24+
if sys.version_info[0] == 2:
25+
warnings.warn(
26+
"Python 2 support will be dropped in the next release of acme. "
27+
"Please upgrade your Python version.",
28+
PendingDeprecationWarning,
29+
) # pragma: no cover

acme/acme/crypto_util.py

+4
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ def probe_sni(name, host, port=443, timeout=300, # pylint: disable=too-many-argu
186186
raise errors.Error(error)
187187
return client_ssl.get_peer_certificate()
188188

189+
189190
def make_csr(private_key_pem, domains, must_staple=False):
190191
"""Generate a CSR containing a list of domains as subjectAltNames.
191192
@@ -226,6 +227,7 @@ def make_csr(private_key_pem, domains, must_staple=False):
226227
return crypto.dump_certificate_request(
227228
crypto.FILETYPE_PEM, csr)
228229

230+
229231
def _pyopenssl_cert_or_req_all_names(loaded_cert_or_req):
230232
common_name = loaded_cert_or_req.get_subject().CN
231233
sans = _pyopenssl_cert_or_req_san(loaded_cert_or_req)
@@ -234,6 +236,7 @@ def _pyopenssl_cert_or_req_all_names(loaded_cert_or_req):
234236
return sans
235237
return [common_name] + [d for d in sans if d != common_name]
236238

239+
237240
def _pyopenssl_cert_or_req_san(cert_or_req):
238241
#for some reason this always return nothing
239242
"""Get Subject Alternative Names from certificate or CSR using pyOpenSSL.
@@ -367,6 +370,7 @@ def gen_ss_cert(key, domains, not_before=None,
367370
cert.sign(key, "sha256")
368371
return cert
369372

373+
370374
def dump_pyopenssl_chain(chain, filetype=crypto.FILETYPE_PEM):
371375
"""Dump certificate chain into a bundle.
372376

acme/setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from setuptools import find_packages
66
from setuptools import setup
77

8-
version = '1.10.0.dev0'
8+
version = '1.11.0.dev0'
99

1010
# Please update tox.ini when modifying dependency version requirements
1111
install_requires = [
@@ -66,6 +66,7 @@
6666
'Programming Language :: Python :: 3.6',
6767
'Programming Language :: Python :: 3.7',
6868
'Programming Language :: Python :: 3.8',
69+
'Programming Language :: Python :: 3.9',
6970
'Topic :: Internet :: WWW/HTTP',
7071
'Topic :: Security',
7172
],

acme/tests/messages_test.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ def test_repr(self):
108108

109109
def test_equality(self):
110110
const_a_prime = self.MockConstant('a')
111-
self.assertFalse(self.const_a == self.const_b)
112-
self.assertTrue(self.const_a == const_a_prime)
111+
self.assertNotEqual(self.const_a, self.const_b)
112+
self.assertEqual(self.const_a, const_a_prime)
113113

114-
self.assertTrue(self.const_a != self.const_b)
115-
self.assertFalse(self.const_a != const_a_prime)
114+
self.assertNotEqual(self.const_a, self.const_b)
115+
self.assertEqual(self.const_a, const_a_prime)
116116

117117

118118
class DirectoryTest(unittest.TestCase):

certbot-apache/certbot_apache/_internal/configurator.py

+3
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ def prepare(self):
327327
if self.version < (2, 2):
328328
raise errors.NotSupportedError(
329329
"Apache Version {0} not supported.".format(str(self.version)))
330+
elif self.version < (2, 4):
331+
logger.warning('Support for Apache 2.2 is deprecated and will be removed in a '
332+
'future release.')
330333

331334
# Recover from previous crash before Augeas initialization to have the
332335
# correct parse tree from the get go.

certbot-apache/setup.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from setuptools import find_packages
66
from setuptools import setup
77

8-
version = '1.10.0.dev0'
8+
version = '1.11.0.dev0'
99

1010
# Remember to update local-oldest-requirements.txt when changing the minimum
1111
# acme/certbot version.
@@ -53,6 +53,7 @@
5353
'Programming Language :: Python :: 3.6',
5454
'Programming Language :: Python :: 3.7',
5555
'Programming Language :: Python :: 3.8',
56+
'Programming Language :: Python :: 3.9',
5657
'Topic :: Internet :: WWW/HTTP',
5758
'Topic :: Security',
5859
'Topic :: System :: Installation/Setup',

certbot-apache/tests/configurator_test.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1360,10 +1360,10 @@ def test_choose_vhosts_wildcard(self):
13601360

13611361
# And the actual returned values
13621362
self.assertEqual(len(vhs), 1)
1363-
self.assertTrue(vhs[0].name == "certbot.demo")
1363+
self.assertEqual(vhs[0].name, "certbot.demo")
13641364
self.assertTrue(vhs[0].ssl)
13651365

1366-
self.assertFalse(vhs[0] == self.vh_truth[3])
1366+
self.assertNotEqual(vhs[0], self.vh_truth[3])
13671367

13681368
@mock.patch("certbot_apache._internal.configurator.ApacheConfigurator.make_vhost_ssl")
13691369
def test_choose_vhosts_wildcard_no_ssl(self, mock_makessl):
@@ -1474,10 +1474,10 @@ def mock_match(aug_expr):
14741474
self.config.parser.aug.match = mock_match
14751475
vhs = self.config.get_virtual_hosts()
14761476
self.assertEqual(len(vhs), 2)
1477-
self.assertTrue(vhs[0] == self.vh_truth[1])
1477+
self.assertEqual(vhs[0], self.vh_truth[1])
14781478
# mock_vhost should have replaced the vh_truth[0], because its filepath
14791479
# isn't a symlink
1480-
self.assertTrue(vhs[1] == mock_vhost)
1480+
self.assertEqual(vhs[1], mock_vhost)
14811481

14821482

14831483
class AugeasVhostsTest(util.ApacheTest):

certbot-apache/tests/dualnode_test.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -412,9 +412,9 @@ def test_parsernode_notequal(self):
412412
ancestor=self.block,
413413
filepath="/path/to/whatever",
414414
metadata=self.metadata)
415-
self.assertFalse(self.block == ne_block)
416-
self.assertFalse(self.directive == ne_directive)
417-
self.assertFalse(self.comment == ne_comment)
415+
self.assertNotEqual(self.block, ne_block)
416+
self.assertNotEqual(self.directive, ne_directive)
417+
self.assertNotEqual(self.comment, ne_comment)
418418

419419
def test_parsed_paths(self):
420420
mock_p = mock.MagicMock(return_value=['/path/file.conf',

certbot-apache/tests/obj_test.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ def test_repr(self):
2727
"certbot_apache._internal.obj.Addr(('127.0.0.1', '443'))")
2828

2929
def test_eq(self):
30-
self.assertTrue(self.vhost1b == self.vhost1)
31-
self.assertFalse(self.vhost1 == self.vhost2)
30+
self.assertEqual(self.vhost1b, self.vhost1)
31+
self.assertNotEqual(self.vhost1, self.vhost2)
3232
self.assertEqual(str(self.vhost1b), str(self.vhost1))
33-
self.assertFalse(self.vhost1b == 1234)
33+
self.assertNotEqual(self.vhost1b, 1234)
3434

3535
def test_ne(self):
36-
self.assertTrue(self.vhost1 != self.vhost2)
37-
self.assertFalse(self.vhost1 != self.vhost1b)
36+
self.assertNotEqual(self.vhost1, self.vhost2)
37+
self.assertEqual(self.vhost1, self.vhost1b)
3838

3939
def test_conflicts(self):
4040
from certbot_apache._internal.obj import Addr
@@ -128,13 +128,13 @@ def test_conflicts(self):
128128
self.assertTrue(self.addr1.conflicts(self.addr2))
129129

130130
def test_equal(self):
131-
self.assertTrue(self.addr1 == self.addr2)
132-
self.assertFalse(self.addr == self.addr1)
133-
self.assertFalse(self.addr == 123)
131+
self.assertEqual(self.addr1, self.addr2)
132+
self.assertNotEqual(self.addr, self.addr1)
133+
self.assertNotEqual(self.addr, 123)
134134

135135
def test_not_equal(self):
136-
self.assertFalse(self.addr1 != self.addr2)
137-
self.assertTrue(self.addr != self.addr1)
136+
self.assertEqual(self.addr1, self.addr2)
137+
self.assertNotEqual(self.addr, self.addr1)
138138

139139

140140
if __name__ == "__main__":

certbot-auto

+14-18
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if [ -z "$VENV_PATH" ]; then
3131
fi
3232
VENV_BIN="$VENV_PATH/bin"
3333
BOOTSTRAP_VERSION_PATH="$VENV_PATH/certbot-auto-bootstrap-version.txt"
34-
LE_AUTO_VERSION="1.9.0"
34+
LE_AUTO_VERSION="1.10.1"
3535
BASENAME=$(basename $0)
3636
USAGE="Usage: $BASENAME [OPTIONS]
3737
A self-updating wrapper script for the Certbot ACME client. When run, updates
@@ -799,11 +799,7 @@ BootstrapMageiaCommon() {
799799
# that function. If Bootstrap is set to a function that doesn't install any
800800
# packages BOOTSTRAP_VERSION is not set.
801801
if [ -f /etc/debian_version ]; then
802-
Bootstrap() {
803-
BootstrapMessage "Debian-based OSes"
804-
BootstrapDebCommon
805-
}
806-
BOOTSTRAP_VERSION="BootstrapDebCommon $BOOTSTRAP_DEB_COMMON_VERSION"
802+
DEPRECATED_OS=1
807803
elif [ -f /etc/mageia-release ]; then
808804
# Mageia has both /etc/mageia-release and /etc/redhat-release
809805
DEPRECATED_OS=1
@@ -1497,18 +1493,18 @@ letsencrypt==0.7.0 \
14971493
--hash=sha256:105a5fb107e45bcd0722eb89696986dcf5f08a86a321d6aef25a0c7c63375ade \
14981494
--hash=sha256:c36e532c486a7e92155ee09da54b436a3c420813ec1c590b98f635d924720de9
14991495
1500-
certbot==1.9.0 \
1501-
--hash=sha256:d5a804d32e471050921f7b39ed9859e2e9de02824176ed78f57266222036b53a \
1502-
--hash=sha256:2ff9bf7d9af381c7efee22dec2dd6938d9d8fddcc9e11682b86e734164a30b57
1503-
acme==1.9.0 \
1504-
--hash=sha256:d8061b396a22b21782c9b23ff9a945b23e50fca2573909a42f845e11d5658ac5 \
1505-
--hash=sha256:38a1630c98e144136c62eec4d2c545a1bdb1a3cd4eca82214be6b83a1f5a161f
1506-
certbot-apache==1.9.0 \
1507-
--hash=sha256:09528a820d57e54984d490100644cd8a6603db97bf5776f86e95795ecfacf23d \
1508-
--hash=sha256:f47fb3f4a9bd927f4812121a0beefe56b163475a28f4db34c64dc838688d9e9e
1509-
certbot-nginx==1.9.0 \
1510-
--hash=sha256:bb2e3f7fe17f071f350a3efa48571b8ef40a8e4b6db9c6da72539206a20b70be \
1511-
--hash=sha256:ab26a4f49d53b0e8bf0f903e58e2a840cda233fe1cbbc54c36ff17f973e57d65
1496+
certbot==1.10.1 \
1497+
--hash=sha256:011ac980fa21b9f29e02c9b8d8b86e8a4bf4670b51b6ad91656e401e9d2d2231 \
1498+
--hash=sha256:0d9ee3fc09e0d03b2d1b1f1c4916e61ecfc6904b4216ddef4e6a5ca1424d9cb7
1499+
acme==1.10.1 \
1500+
--hash=sha256:752d598e54e98ad1e874de53fd50c61044f1b566d6deb790db5676ce9c573546 \
1501+
--hash=sha256:fcbb559aedc96b404edf593e78517dcd7291984d5a37036c3fc77f3c5c122fd8
1502+
certbot-apache==1.10.1 \
1503+
--hash=sha256:f077b4b7f166627ef5e0921fe7cde57700670fc86e9ad9dbdfaf2c573cc0f2fa \
1504+
--hash=sha256:97ed637b4c7b03820db6c69aa90145dc989933351d46a3d62baf6b71674f0a10
1505+
certbot-nginx==1.10.1 \
1506+
--hash=sha256:7c36459021f8a1ec3b6c062e4c4fc866bfaa1dbf26ccd29e043dd6848003be08 \
1507+
--hash=sha256:c0bbeccf85f46b728fd95e6bb8c2649d32d3383d7f47ea4b9c312d12bf04d2f0
15121508
15131509
UNLIKELY_EOF
15141510
# -------------------------------------------------------------------------

0 commit comments

Comments
 (0)