Commit graph

421 commits

Author SHA1 Message Date
Brad Warren
4f24ada502 fix tests 2020-04-30 13:54:39 -07:00
Brad Warren
85225751a7 Revert "Temporary fix, REVERT"
This reverts commit 0976176a56.
2020-04-30 13:45:47 -07:00
Joona Hoikkala
0976176a56
Temporary fix, REVERT 2020-04-30 01:29:52 +03:00
Joona Hoikkala
ae76f2d3b5
Fix the OCSP api call 2020-04-30 01:20:15 +03:00
Joona Hoikkala
839b86871d
Move cert_sha1_fingerprint to to internal apache_util 2020-04-22 20:56:48 +03:00
Joona Hoikkala
1e5d13f212
Implement deploy hook for ocsp prefetch functionality 2020-04-22 20:46:10 +03:00
Joona Hoikkala
c3ebf331e9
Fix merge issues 2020-04-22 19:39:05 +03:00
Joona Hoikkala
2d9e9c8aef
Merge remote-tracking branch 'origin/master' into ocsp_apache_continued 2020-04-22 19:18:41 +03:00
Brad Warren
859dc38cb9
Consolidate cover envs and default to py3-cover (#7905)
* Consolidate cover envs and default to py3-cover

* use py38 for code coverage in Travis

* Disable coverage on Python < 3.6 line.
2020-04-16 08:59:40 -07:00
Joona Hoikkala
741278ef67
Use certificate file path as key for the internal storage and remove revoked and deleted certificates from pool when met 2020-04-16 00:50:19 +03:00
ohemorange
8fb9a395ab
Do not require mock in Python 3 in apache module (#7896)
Part of #7886.

This PR conditionally installs mock in `apache/setup.py` based on setuptools version and python version, when possible. It then updates `apache` tests to use `unittest.mock` when `mock` isn't available.

* Conditionally install mock in apache

* error out on newer python and older setuptools

* error when trying to build wheels with old setuptools

* use unittest.mock when third-party mock isn't available in apache, with no cover and type ignore
2020-04-15 11:30:08 -07:00
Karan Suthar
8e4dc0a48c
Minor bugfixes (#7891)
* Fix dangerous default argument

* Remove unused imports

* Remove unnecessary comprehension

* Use literal syntax to create data structure

* Use literal syntax instead of function calls to create data structure

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
2020-04-13 10:41:39 -07:00
Joona Hoikkala
57cd0c7d81
Address review comments 2020-04-09 02:42:26 +03:00
m0namon
1285297b23
[Apache v2] Load apacheconfig tree and gate related tests (#7710)
* Load apacheconfig dependency, gate behind flag

* Bump apacheconfig dependency to latest version and install dev version of apache for coverage tests

* Move augeasnode_test tests to more generic parsernode_test

* Revert "Move augeasnode_test tests to more generic parsernode_test"

This reverts commit 6bb986ef78.

* Mock AugeasNode into DualNode's place, and run augeasnode tests exclusively on AugeasNode

* Don't calculate coverage for skeleton functions

* clean up helper function in augeasnode_test
2020-03-23 17:05:22 -07:00
ohemorange
9e3c348dff
Disable TLS session tickets in Apache (#7771)
Fixes #7350.

This PR changes the parsed modules from a `set` to a `dict`, with the filepath argument as the value. Accordingly, after calling `enable_mod` to enable `ssl_module`, modules now need to be re-parsed, so call `reset_modules`.

* Add mechanism for selecting apache config file, based on work done in #7191.

* Check OpenSSL version

* Remove os imports

* debian override still needs os

* Reformat remaining apache tests with modules dict syntax

* Clean up more apache tests

* Switch from property to method for openssl and add tests for coverage.

* Sometimes the dict location will be None in which case we should in fact return None

* warn thoroughly and consistently in openssl_version function

* update tests for new warnings

* read file as bytes, and factor out the open for testing

* normalize ssl_module_location path to account for being relative to server root

* Use byte literals in a python 2 and 3 compatible way

* string does need to be a literal

* patch builtins open

* add debug, remove space

* Add test to check if OpenSSL detection is working on different systems

* fix relative test location for cwd

* put </IfModule> on its own line in test case

* Revert test file to status in master.

* Call augeas load before reparsing modules to pick up the changes

* fix grep, tail, and mod_ssl location on centos

* strip the trailing whitespace from fedora

* just use LooseVersion in test

* call apache2ctl on debian systems

* Use sudo for apache2ctl command

* add check to make sure we're getting a version

* Add boolean so we don't warn on debian/ubuntu before trying to enable mod_ssl

* Reduce warnings while testing by setting mock _openssl_version.

* Make sure we're not throwing away any unwritten changes to the config

* test last warning case for coverage

* text changes for clarity
2020-03-23 16:49:52 -07:00
Brad Warren
06599a1e18
Cleanup more pylint issues (#7848)
This PR builds on #7657 and cleans up additional unnecessary pylint comments and some stray comments referring to pylint: disable comments that have been deleted that I didn't notice in my review of that PR.

* Remove stray pylint link.

* Cleanup more pylint comments

* Cleanup magic_typing imports

* Remove unneeded pylint: enable comments
2020-03-16 09:43:48 -07:00
Joona Hoikkala
895330e009
Use filesystem.replace for atomic move operations 2020-03-04 20:21:00 +02:00
Brad Warren
144d4f2b44 Bump version to 1.4.0 2020-03-03 12:43:04 -08:00
Brad Warren
6edb4e1a39
Release 1.3.0 2020-03-03 12:43:02 -08:00
m0namon
f169c37153
Merge pull request #7742 from osirisinferi/force-non-restrictive-umask
Force non restrictive umask when creating challenge directory in Apache plugin
2020-02-26 17:09:20 -08:00
Joona Hoikkala
dc255aeb4f
Fix tests and handle PluginError 2020-02-26 20:08:20 +02:00
Joona Hoikkala
b0feb33b9b
Fix the backup target path 2020-02-26 18:51:25 +02:00
osirisinferi
9819443440
Add test 2020-02-22 15:22:27 +01:00
Joona Hoikkala
a42cf70f71
More review comment fixes 2020-02-19 20:44:37 +02:00
Joona Hoikkala
d6dafb0a1b Merge branch 'ocsp_apache_continued' of github.com:certbot/certbot into ocsp_apache_continued 2020-02-19 18:07:58 +02:00
Joona Hoikkala
f192cbf12a
Address review comments 2020-02-19 18:07:30 +02:00
Joona Hoikkala
5a8032d5cc
Update certbot-apache/certbot_apache/_internal/prefetch_ocsp.py
Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>
2020-02-19 18:04:30 +02:00
Joona Hoikkala
83b73aeb93
Update certbot-apache/setup.py
Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>
2020-02-19 17:14:07 +02:00
Brad Warren
42dda355c5
Correct AutoHSTS docs (#7767)
domains is a list of strings, not a single string.

* Correct AutoHSTS docs.

* Fix Apache enable_autohsts docs.
2020-02-18 14:54:07 -08:00
Adrien Ferrand
fc7e5e8e60
Remove useless pylint error suppression directives (#7657)
As pylint is evolving, it improves its accuracy, and several pylint error suppression (`# pylint: disable=ERROR) added in certbot codebase months or years ago are not needed anymore to make it happy.

There is a (disabled by default) pylint error to detect the useless suppressions (pylint-ception: `useless-suppression`). It is not working perfectly (it has also false-positives ...) but it is a good start to clean the codebase.

This PR removes several of these useless suppressions as detected by the current pylint version we use.

* Remove useless suppress

* Remove useless lines
2020-02-13 13:56:16 -08:00
Joona Hoikkala
a446e124e4
Fix tests after moving ocsp to public api 2020-02-12 17:55:10 +02:00
Joona Hoikkala
8ddc17fd2c
Merge remote-tracking branch 'origin/master' into ocsp_apache_continued 2020-02-12 17:42:41 +02:00
ohemorange
c5a2ba03da
Merge pull request #7735 from certbot/apache-parser-v2
[Apache v2] Merge apache-parser-v2 feature branch back to master
2020-02-06 15:29:28 -08:00
OsirisInferi
d3a4b8fd8c
Missing import 2020-02-05 22:27:12 +01:00
OsirisInferi
f3ed133744
Wrap makedirs() within exception handelrs 2020-02-05 22:17:29 +01:00
Joona Hoikkala
caf2ad2cb1
Add overview documentation of the functionality to .py 2020-02-05 17:00:08 +02:00
Erica Portnoy
6a4b610269 Bump version to 1.3.0 2020-02-04 14:01:04 -08:00
Erica Portnoy
3907b53b4b
Release 1.2.0 2020-02-04 14:01:02 -08:00
Joona Hoikkala
17af868f62
Update certbot-apache/certbot_apache/_internal/apache_util.py
Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>
2020-02-04 22:04:01 +02:00
Joona Hoikkala
4b3dea8be6
Update certbot-apache/certbot_apache/_internal/configurator.py
Co-Authored-By: Brad Warren <bmw@users.noreply.github.com>
2020-02-04 21:58:42 +02:00
OsirisInferi
86926dff92
Use unrestrictive umask for challenge directory 2020-02-04 19:27:27 +01:00
Joona Hoikkala
6395cc2b48
Copy dbm file to work directory before writing 2020-02-04 20:13:28 +02:00
Joona Hoikkala
1ad23f9db0
Move DBM handling to a context manager 2020-02-04 13:13:04 +02:00
Joona Hoikkala
fd74aba422
Address review comments 2020-02-03 22:18:52 +02:00
Joona Hoikkala
b6ea34c61d
Address review comments 2020-01-31 20:06:52 +02:00
Joona Hoikkala
882335c7ec
Merge remote-tracking branch 'origin/master' into ap2_to_master 2020-01-30 17:08:16 +02:00
Joona Hoikkala
a8a106c325
Small fixes 2020-01-30 16:58:14 +02:00
ohemorange
11e402893f
Remove SSLCompression off line from all config options (#7726)
Based on discussion at https://github.com/certbot/certbot/pull/7712#discussion_r371451761.

* Remove SSLCompression off line from all config options

* Update changelog
2020-01-29 15:21:17 -08:00
Joona Hoikkala
4138259c51
Add certbot-apache tests and mypy type hints 2020-01-27 15:10:04 +02:00
Joona Hoikkala
549061249f
Parse producedAt, thisUpdate and nextUpdate values from OCSP response and calculate Apache internal TTL 2020-01-26 23:42:29 +02:00