certbot-apache 4.2.0__tar.gz → 5.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {certbot_apache-4.2.0/src/certbot_apache.egg-info → certbot_apache-5.1.0}/PKG-INFO +11 -19
- certbot_apache-5.1.0/pyproject.toml +52 -0
- certbot_apache-5.1.0/setup.py +17 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/apache_util.py +11 -14
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/apacheparser.py +9 -11
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/assertions.py +1 -2
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/augeasparser.py +23 -27
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/configurator.py +65 -67
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/constants.py +8 -9
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/display_ops.py +3 -5
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/dualparser.py +10 -13
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/entrypoint.py +2 -4
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/http_01.py +8 -10
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/interfaces.py +12 -15
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/obj.py +5 -6
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/parser.py +24 -28
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/parsernode_util.py +7 -9
- certbot_apache-5.1.0/src/certbot_apache/_internal/tests/apache-conf-files/apache-conf-test-pebble.py +26 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/augeasnode_test.py +1 -2
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/autohsts_test.py +0 -1
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/centos_test.py +0 -1
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/complex_parsing_test.py +0 -7
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/configurator_reverter_test.py +0 -7
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/configurator_test.py +45 -13
- certbot_apache-5.1.0/src/certbot_apache/_internal/tests/conftest.py +8 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/debian_test.py +0 -1
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/fedora_test.py +0 -1
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/gentoo_test.py +0 -1
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/http_01_test.py +1 -3
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/parser_test.py +0 -17
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/parsernode_configurator_test.py +4 -3
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/parsernode_test.py +2 -2
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/util.py +4 -4
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tls_configs/current-options-ssl-apache.conf +2 -1
- {certbot_apache-4.2.0 → certbot_apache-5.1.0/src/certbot_apache.egg-info}/PKG-INFO +11 -19
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache.egg-info/SOURCES.txt +3 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache.egg-info/requires.txt +2 -2
- certbot_apache-4.2.0/setup.py +0 -66
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/LICENSE.txt +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/MANIFEST.in +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/README.rst +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/setup.cfg +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/__init__.py +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/__init__.py +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/augeas_lens/httpd.aug +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/override_alpine.py +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/override_arch.py +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/override_centos.py +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/override_darwin.py +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/override_debian.py +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/override_fedora.py +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/override_gentoo.py +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/override_suse.py +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/override_void.py +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/__init__.py +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/display_ops_test.py +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/dualnode_test.py +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/entrypoint_test.py +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/obj_test.py +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/parsernode_util_test.py +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf/httpd.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf/magic +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.d/README +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.d/autoindex.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.d/centos.example.com.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.d/ssl.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.d/userdir.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.d/welcome.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-base.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-dav.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-lua.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-mpm.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-proxy.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-ssl.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/00-systemd.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/centos7_apache/apache/httpd/conf.modules.d/01-cgi.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/centos7_apache/apache/sites +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/centos7_apache/apache/sysconfig/httpd +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/complex_parsing/apache2.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/complex_parsing/conf-enabled/dummy.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/complex_parsing/test_fnmatch.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/complex_parsing/test_variables.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/apache2.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/bad_conf_file.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/other-vhosts-access-log.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/security.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-available/serve-cgi-bin.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-enabled/other-vhosts-access-log.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-enabled/security.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/conf-enabled/serve-cgi-bin.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/envvars +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/authz_svn.load +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/dav.load +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/dav_svn.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/dav_svn.load +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/rewrite.load +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/ssl.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-available/ssl.load +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/authz_svn.load +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/dav.load +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/dav_svn.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/mods-enabled/dav_svn.load +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/ports.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-available/another_wildcard.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-available/old-and-default.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-available/wildcard.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-enabled/another_wildcard.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-enabled/old-and-default.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/apache2/sites-enabled/wildcard.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/augeas_vhosts/sites +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/apache2.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-available/other-vhosts-access-log.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-available/security.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-available/serve-cgi-bin.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-enabled/other-vhosts-access-log.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-enabled/security.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/conf-enabled/serve-cgi-bin.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/envvars +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/mods-available/ssl.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/mods-available/ssl.load +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/ports.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/sites-available/000-default.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/sites-available/default-ssl.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/apache2/sites-enabled/000-default.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/default_vhost/sites +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/apache2.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/envvars +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/ports.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-available/default.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-available/multi-vhost.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-enabled/default.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multi_vhosts/apache2/sites-enabled/multi-vhost.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/apache2.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/bad_conf_file.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/other-vhosts-access-log.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/security.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-available/serve-cgi-bin.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-enabled/other-vhosts-access-log.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-enabled/security.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/conf-enabled/serve-cgi-bin.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/envvars +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/authz_svn.load +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/dav.load +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/dav_svn.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/dav_svn.load +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/rewrite.load +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/ssl.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-available/ssl.load +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/authz_svn.load +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/dav.load +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/dav_svn.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/mods-enabled/dav_svn.load +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/ports.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/000-default.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/certbot.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/default-ssl-port-only.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/default-ssl.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/duplicatehttp.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/duplicatehttps.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/empty.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/encryption-example.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/mod_macro-example.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/no-directives.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/ocsp-ssl.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-available/wildcard.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/000-default.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/certbot.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/default-ssl-port-only.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/default-ssl.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/duplicatehttp.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/duplicatehttps.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/encryption-example.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/mod_macro-example.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/non-symlink.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/ocsp-ssl.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/apache2/sites-enabled/wildcard.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/debian_apache_2_4/multiple_vhosts/sites +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/httpd.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/magic +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_default_settings.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_error_documents.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_languages.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_autoindex.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_info.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_log_config.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_mime.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_status.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mod_userdir.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/00_mpm.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/10_mod_mem_cache.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/40_mod_ssl.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/41_mod_http2.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/45_mod_dav.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/modules.d/46_mod_ldap.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/00_default_ssl_vhost.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/00_default_vhost.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/default_vhost.include +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/apache2/vhosts.d/gentoo.example.com.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/conf.d/apache2 +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tests/testdata/gentoo_apache/apache/sites +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/_internal/tls_configs/old-options-ssl-apache.conf +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache/py.typed +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache.egg-info/dependency_links.txt +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache.egg-info/entry_points.txt +0 -0
- {certbot_apache-4.2.0 → certbot_apache-5.1.0}/src/certbot_apache.egg-info/top_level.txt +0 -0
|
@@ -1,45 +1,37 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: certbot-apache
|
|
3
|
-
Version:
|
|
3
|
+
Version: 5.1.0
|
|
4
4
|
Summary: Apache plugin for Certbot
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
License: Apache License 2.0
|
|
5
|
+
Author-email: Certbot Project <certbot-dev@eff.org>
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/certbot/certbot
|
|
9
8
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
9
|
Classifier: Environment :: Plugins
|
|
11
10
|
Classifier: Intended Audience :: System Administrators
|
|
12
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
11
|
Classifier: Operating System :: POSIX :: Linux
|
|
14
12
|
Classifier: Programming Language :: Python
|
|
15
13
|
Classifier: Programming Language :: Python :: 3
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
21
18
|
Classifier: Topic :: Internet :: WWW/HTTP
|
|
22
19
|
Classifier: Topic :: Security
|
|
23
20
|
Classifier: Topic :: System :: Installation/Setup
|
|
24
21
|
Classifier: Topic :: System :: Networking
|
|
25
22
|
Classifier: Topic :: System :: Systems Administration
|
|
26
23
|
Classifier: Topic :: Utilities
|
|
27
|
-
Requires-Python: >=3.
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/x-rst
|
|
28
26
|
License-File: LICENSE.txt
|
|
29
|
-
Requires-Dist: acme>=
|
|
30
|
-
Requires-Dist: certbot>=
|
|
27
|
+
Requires-Dist: acme>=5.1.0
|
|
28
|
+
Requires-Dist: certbot>=5.1.0
|
|
31
29
|
Requires-Dist: python-augeas
|
|
32
30
|
Provides-Extra: dev
|
|
33
31
|
Requires-Dist: apacheconfig>=0.3.2; extra == "dev"
|
|
34
32
|
Provides-Extra: test
|
|
35
33
|
Requires-Dist: pytest; extra == "test"
|
|
36
|
-
Dynamic: author
|
|
37
|
-
Dynamic: author-email
|
|
38
|
-
Dynamic: classifier
|
|
39
|
-
Dynamic: home-page
|
|
40
|
-
Dynamic: license
|
|
41
34
|
Dynamic: license-file
|
|
42
|
-
Dynamic: provides-extra
|
|
43
35
|
Dynamic: requires-dist
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
|
|
37
|
+
Apache plugin for Certbot
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "certbot-apache"
|
|
7
|
+
dynamic = ["version", "dependencies"]
|
|
8
|
+
description = "Apache plugin for Certbot"
|
|
9
|
+
readme = "README.rst"
|
|
10
|
+
license = "Apache-2.0"
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Certbot Project", email = "certbot-dev@eff.org" },
|
|
14
|
+
]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 5 - Production/Stable",
|
|
17
|
+
"Environment :: Plugins",
|
|
18
|
+
"Intended Audience :: System Administrators",
|
|
19
|
+
"Operating System :: POSIX :: Linux",
|
|
20
|
+
"Programming Language :: Python",
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"Programming Language :: Python :: 3.13",
|
|
23
|
+
"Programming Language :: Python :: 3.10",
|
|
24
|
+
"Programming Language :: Python :: 3.11",
|
|
25
|
+
"Programming Language :: Python :: 3.12",
|
|
26
|
+
"Topic :: Internet :: WWW/HTTP",
|
|
27
|
+
"Topic :: Security",
|
|
28
|
+
"Topic :: System :: Installation/Setup",
|
|
29
|
+
"Topic :: System :: Networking",
|
|
30
|
+
"Topic :: System :: Systems Administration",
|
|
31
|
+
"Topic :: Utilities",
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
[project.optional-dependencies]
|
|
35
|
+
dev = [
|
|
36
|
+
"apacheconfig>=0.3.2",
|
|
37
|
+
]
|
|
38
|
+
test = [
|
|
39
|
+
"pytest",
|
|
40
|
+
]
|
|
41
|
+
|
|
42
|
+
[project.entry-points."certbot.plugins"]
|
|
43
|
+
apache = "certbot_apache._internal.entrypoint:ENTRYPOINT"
|
|
44
|
+
|
|
45
|
+
[project.urls]
|
|
46
|
+
Homepage = "https://github.com/certbot/certbot"
|
|
47
|
+
|
|
48
|
+
[tool.setuptools]
|
|
49
|
+
package-dir = {"" = "src"}
|
|
50
|
+
|
|
51
|
+
[tool.setuptools.packages.find]
|
|
52
|
+
where = ["src"]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
from setuptools import setup
|
|
2
|
+
|
|
3
|
+
version = '5.1.0'
|
|
4
|
+
|
|
5
|
+
install_requires = [
|
|
6
|
+
# We specify the minimum acme and certbot version as the current plugin
|
|
7
|
+
# version for simplicity. See
|
|
8
|
+
# https://github.com/certbot/certbot/issues/8761 for more info.
|
|
9
|
+
f'acme>={version}',
|
|
10
|
+
f'certbot>={version}',
|
|
11
|
+
'python-augeas',
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
setup(
|
|
15
|
+
version=version,
|
|
16
|
+
install_requires=install_requires,
|
|
17
|
+
)
|
|
@@ -7,11 +7,8 @@ import logging
|
|
|
7
7
|
import re
|
|
8
8
|
import subprocess
|
|
9
9
|
from contextlib import ExitStack
|
|
10
|
-
from typing import Dict
|
|
11
10
|
from typing import Iterable
|
|
12
|
-
from typing import List
|
|
13
11
|
from typing import Optional
|
|
14
|
-
from typing import Tuple
|
|
15
12
|
|
|
16
13
|
from certbot import errors
|
|
17
14
|
from certbot import util
|
|
@@ -20,7 +17,7 @@ from certbot.compat import os
|
|
|
20
17
|
logger = logging.getLogger(__name__)
|
|
21
18
|
|
|
22
19
|
|
|
23
|
-
def get_mod_deps(mod_name: str) ->
|
|
20
|
+
def get_mod_deps(mod_name: str) -> list[str]:
|
|
24
21
|
"""Get known module dependencies.
|
|
25
22
|
|
|
26
23
|
.. note:: This does not need to be accurate in order for the client to
|
|
@@ -68,7 +65,7 @@ def get_internal_aug_path(vhost_path: str) -> str:
|
|
|
68
65
|
return _split_aug_path(vhost_path)[1]
|
|
69
66
|
|
|
70
67
|
|
|
71
|
-
def _split_aug_path(vhost_path: str) ->
|
|
68
|
+
def _split_aug_path(vhost_path: str) -> tuple[str, str]:
|
|
72
69
|
"""Splits an Augeas path into a file path and an internal path.
|
|
73
70
|
|
|
74
71
|
After removing "/files", this function splits vhost_path into the
|
|
@@ -82,7 +79,7 @@ def _split_aug_path(vhost_path: str) -> Tuple[str, str]:
|
|
|
82
79
|
"""
|
|
83
80
|
# Strip off /files
|
|
84
81
|
file_path = vhost_path[6:]
|
|
85
|
-
internal_path:
|
|
82
|
+
internal_path: list[str] = []
|
|
86
83
|
|
|
87
84
|
# Remove components from the end of file_path until it becomes valid
|
|
88
85
|
while not os.path.exists(file_path):
|
|
@@ -92,7 +89,7 @@ def _split_aug_path(vhost_path: str) -> Tuple[str, str]:
|
|
|
92
89
|
return file_path, "/".join(reversed(internal_path))
|
|
93
90
|
|
|
94
91
|
|
|
95
|
-
def parse_define_file(filepath: str, varname: str) ->
|
|
92
|
+
def parse_define_file(filepath: str, varname: str) -> dict[str, str]:
|
|
96
93
|
""" Parses Defines from a variable in configuration file
|
|
97
94
|
|
|
98
95
|
:param str filepath: Path of file to parse
|
|
@@ -102,7 +99,7 @@ def parse_define_file(filepath: str, varname: str) -> Dict[str, str]:
|
|
|
102
99
|
:rtype: `dict`
|
|
103
100
|
|
|
104
101
|
"""
|
|
105
|
-
return_vars:
|
|
102
|
+
return_vars: dict[str, str] = {}
|
|
106
103
|
# Get list of words in the variable
|
|
107
104
|
a_opts = util.get_var_from_file(varname, filepath).split()
|
|
108
105
|
for i, v in enumerate(a_opts):
|
|
@@ -137,7 +134,7 @@ def included_in_paths(filepath: str, paths: Iterable[str]) -> bool:
|
|
|
137
134
|
return any(fnmatch.fnmatch(filepath, path) for path in paths)
|
|
138
135
|
|
|
139
136
|
|
|
140
|
-
def parse_defines(define_cmd:
|
|
137
|
+
def parse_defines(define_cmd: list[str]) -> dict[str, str]:
|
|
141
138
|
"""
|
|
142
139
|
Gets Defines from httpd process and returns a dictionary of
|
|
143
140
|
the defined variables.
|
|
@@ -148,7 +145,7 @@ def parse_defines(define_cmd: List[str]) -> Dict[str, str]:
|
|
|
148
145
|
:rtype: dict
|
|
149
146
|
"""
|
|
150
147
|
|
|
151
|
-
variables:
|
|
148
|
+
variables: dict[str, str] = {}
|
|
152
149
|
matches = parse_from_subprocess(define_cmd, r"Define: ([^ \n]*)")
|
|
153
150
|
try:
|
|
154
151
|
matches.remove("DUMP_RUN_CFG")
|
|
@@ -164,7 +161,7 @@ def parse_defines(define_cmd: List[str]) -> Dict[str, str]:
|
|
|
164
161
|
return variables
|
|
165
162
|
|
|
166
163
|
|
|
167
|
-
def parse_includes(inc_cmd:
|
|
164
|
+
def parse_includes(inc_cmd: list[str]) -> list[str]:
|
|
168
165
|
"""
|
|
169
166
|
Gets Include directives from httpd process and returns a list of
|
|
170
167
|
their values.
|
|
@@ -178,7 +175,7 @@ def parse_includes(inc_cmd: List[str]) -> List[str]:
|
|
|
178
175
|
return parse_from_subprocess(inc_cmd, r"\(.*\) (.*)")
|
|
179
176
|
|
|
180
177
|
|
|
181
|
-
def parse_modules(mod_cmd:
|
|
178
|
+
def parse_modules(mod_cmd: list[str]) -> list[str]:
|
|
182
179
|
"""
|
|
183
180
|
Get loaded modules from httpd process, and return the list
|
|
184
181
|
of loaded module names.
|
|
@@ -192,7 +189,7 @@ def parse_modules(mod_cmd: List[str]) -> List[str]:
|
|
|
192
189
|
return parse_from_subprocess(mod_cmd, r"(.*)_module")
|
|
193
190
|
|
|
194
191
|
|
|
195
|
-
def parse_from_subprocess(command:
|
|
192
|
+
def parse_from_subprocess(command: list[str], regexp: str) -> list[str]:
|
|
196
193
|
"""Get values from stdout of subprocess command
|
|
197
194
|
|
|
198
195
|
:param list command: Command to run
|
|
@@ -206,7 +203,7 @@ def parse_from_subprocess(command: List[str], regexp: str) -> List[str]:
|
|
|
206
203
|
return re.compile(regexp).findall(stdout)
|
|
207
204
|
|
|
208
205
|
|
|
209
|
-
def _get_runtime_cfg(command:
|
|
206
|
+
def _get_runtime_cfg(command: list[str]) -> str:
|
|
210
207
|
"""
|
|
211
208
|
Get runtime configuration info.
|
|
212
209
|
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
""" apacheconfig implementation of the ParserNode interfaces """
|
|
2
2
|
from typing import Any
|
|
3
3
|
from typing import Iterable
|
|
4
|
-
from typing import List
|
|
5
4
|
from typing import Optional
|
|
6
|
-
from typing import Tuple
|
|
7
5
|
|
|
8
6
|
from certbot_apache._internal import assertions
|
|
9
7
|
from certbot_apache._internal import interfaces
|
|
@@ -31,7 +29,7 @@ class ApacheParserNode(interfaces.ParserNode):
|
|
|
31
29
|
def save(self, msg: str) -> None:
|
|
32
30
|
pass # pragma: no cover
|
|
33
31
|
|
|
34
|
-
def find_ancestors(self, name: str) ->
|
|
32
|
+
def find_ancestors(self, name: str) -> list["ApacheParserNode"]: # pylint: disable=unused-variable
|
|
35
33
|
"""Find ancestor BlockNodes with a given name"""
|
|
36
34
|
return [ApacheBlockNode(name=assertions.PASS,
|
|
37
35
|
parameters=assertions.PASS,
|
|
@@ -90,7 +88,7 @@ class ApacheBlockNode(ApacheDirectiveNode):
|
|
|
90
88
|
|
|
91
89
|
def __init__(self, **kwargs: Any) -> None:
|
|
92
90
|
super().__init__(**kwargs)
|
|
93
|
-
self.children:
|
|
91
|
+
self.children: tuple[ApacheParserNode, ...] = ()
|
|
94
92
|
|
|
95
93
|
def __eq__(self, other: Any) -> bool:
|
|
96
94
|
if isinstance(other, self.__class__):
|
|
@@ -105,7 +103,7 @@ class ApacheBlockNode(ApacheDirectiveNode):
|
|
|
105
103
|
return False # pragma: no cover
|
|
106
104
|
|
|
107
105
|
# pylint: disable=unused-argument
|
|
108
|
-
def add_child_block(self, name: str, parameters: Optional[
|
|
106
|
+
def add_child_block(self, name: str, parameters: Optional[list[str]] = None,
|
|
109
107
|
position: Optional[int] = None) -> "ApacheBlockNode": # pragma: no cover
|
|
110
108
|
"""Adds a new BlockNode to the sequence of children"""
|
|
111
109
|
new_block = ApacheBlockNode(name=assertions.PASS,
|
|
@@ -117,7 +115,7 @@ class ApacheBlockNode(ApacheDirectiveNode):
|
|
|
117
115
|
return new_block
|
|
118
116
|
|
|
119
117
|
# pylint: disable=unused-argument
|
|
120
|
-
def add_child_directive(self, name: str, parameters: Optional[
|
|
118
|
+
def add_child_directive(self, name: str, parameters: Optional[list[str]] = None,
|
|
121
119
|
position: Optional[int] = None
|
|
122
120
|
) -> ApacheDirectiveNode: # pragma: no cover
|
|
123
121
|
"""Adds a new DirectiveNode to the sequence of children"""
|
|
@@ -142,7 +140,7 @@ class ApacheBlockNode(ApacheDirectiveNode):
|
|
|
142
140
|
self.children += (new_comment,)
|
|
143
141
|
return new_comment
|
|
144
142
|
|
|
145
|
-
def find_blocks(self, name: str, exclude: bool = True) ->
|
|
143
|
+
def find_blocks(self, name: str, exclude: bool = True) -> list["ApacheBlockNode"]: # pylint: disable=unused-argument
|
|
146
144
|
"""Recursive search of BlockNodes from the sequence of children"""
|
|
147
145
|
return [ApacheBlockNode(name=assertions.PASS,
|
|
148
146
|
parameters=assertions.PASS,
|
|
@@ -150,7 +148,7 @@ class ApacheBlockNode(ApacheDirectiveNode):
|
|
|
150
148
|
filepath=assertions.PASS,
|
|
151
149
|
metadata=self.metadata)]
|
|
152
150
|
|
|
153
|
-
def find_directives(self, name: str, exclude: bool = True) ->
|
|
151
|
+
def find_directives(self, name: str, exclude: bool = True) -> list[ApacheDirectiveNode]: # pylint: disable=unused-argument
|
|
154
152
|
"""Recursive search of DirectiveNodes from the sequence of children"""
|
|
155
153
|
return [ApacheDirectiveNode(name=assertions.PASS,
|
|
156
154
|
parameters=assertions.PASS,
|
|
@@ -159,7 +157,7 @@ class ApacheBlockNode(ApacheDirectiveNode):
|
|
|
159
157
|
metadata=self.metadata)]
|
|
160
158
|
|
|
161
159
|
# pylint: disable=unused-argument
|
|
162
|
-
def find_comments(self, comment: str, exact: bool = False) ->
|
|
160
|
+
def find_comments(self, comment: str, exact: bool = False) -> list[ApacheCommentNode]:
|
|
163
161
|
"""Recursive search of DirectiveNodes from the sequence of children"""
|
|
164
162
|
return [ApacheCommentNode(comment=assertions.PASS, # pragma: no cover
|
|
165
163
|
ancestor=self,
|
|
@@ -170,11 +168,11 @@ class ApacheBlockNode(ApacheDirectiveNode):
|
|
|
170
168
|
"""Deletes a ParserNode from the sequence of children"""
|
|
171
169
|
return # pragma: no cover
|
|
172
170
|
|
|
173
|
-
def unsaved_files(self) ->
|
|
171
|
+
def unsaved_files(self) -> list[str]:
|
|
174
172
|
"""Returns a list of unsaved filepaths"""
|
|
175
173
|
return [assertions.PASS] # pragma: no cover
|
|
176
174
|
|
|
177
|
-
def parsed_paths(self) ->
|
|
175
|
+
def parsed_paths(self) -> list[str]:
|
|
178
176
|
"""Returns a list of parsed configuration file paths"""
|
|
179
177
|
return [assertions.PASS]
|
|
180
178
|
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import fnmatch
|
|
3
3
|
from typing import Any
|
|
4
4
|
from typing import Iterable
|
|
5
|
-
from typing import List
|
|
6
5
|
from typing import Optional
|
|
7
6
|
from typing import Union
|
|
8
7
|
|
|
@@ -103,7 +102,7 @@ def isPassComment(comment: CommentNode) -> bool:
|
|
|
103
102
|
return False
|
|
104
103
|
|
|
105
104
|
|
|
106
|
-
def isPassNodeList(nodelist:
|
|
105
|
+
def isPassNodeList(nodelist: list[Union[DirectiveNode, CommentNode]]) -> bool: # pragma: no cover
|
|
107
106
|
""" Checks if a ParserNode in the nodelist should pass the assertion,
|
|
108
107
|
this function is used for results of find_* methods. Unimplemented find_*
|
|
109
108
|
methods should return a sequence containing a single ParserNode instance
|
|
@@ -66,12 +66,8 @@ Translates over to:
|
|
|
66
66
|
"""
|
|
67
67
|
from typing import Any
|
|
68
68
|
from typing import cast
|
|
69
|
-
from typing import Dict
|
|
70
69
|
from typing import Iterable
|
|
71
|
-
from typing import List
|
|
72
70
|
from typing import Optional
|
|
73
|
-
from typing import Set
|
|
74
|
-
from typing import Tuple
|
|
75
71
|
from typing import Union
|
|
76
72
|
|
|
77
73
|
from certbot import errors
|
|
@@ -109,7 +105,7 @@ class AugeasParserNode(interfaces.ParserNode):
|
|
|
109
105
|
def save(self, msg: Iterable[str]) -> None:
|
|
110
106
|
self.parser.save(msg)
|
|
111
107
|
|
|
112
|
-
def find_ancestors(self, name: str) ->
|
|
108
|
+
def find_ancestors(self, name: str) -> list["AugeasParserNode"]:
|
|
113
109
|
"""
|
|
114
110
|
Searches for ancestor BlockNodes with a given name.
|
|
115
111
|
|
|
@@ -119,7 +115,7 @@ class AugeasParserNode(interfaces.ParserNode):
|
|
|
119
115
|
:rtype: list of AugeasParserNode
|
|
120
116
|
"""
|
|
121
117
|
|
|
122
|
-
ancestors:
|
|
118
|
+
ancestors: list["AugeasParserNode"] = []
|
|
123
119
|
|
|
124
120
|
parent = self.metadata["augeaspath"]
|
|
125
121
|
while True:
|
|
@@ -143,7 +139,7 @@ class AugeasParserNode(interfaces.ParserNode):
|
|
|
143
139
|
"""
|
|
144
140
|
|
|
145
141
|
name: str = self._aug_get_name(path)
|
|
146
|
-
metadata:
|
|
142
|
+
metadata: dict[str, Union[parser.ApacheParser, str]] = {
|
|
147
143
|
"augeasparser": self.parser, "augeaspath": path
|
|
148
144
|
}
|
|
149
145
|
|
|
@@ -236,7 +232,7 @@ class AugeasDirectiveNode(AugeasParserNode):
|
|
|
236
232
|
self.parser.aug.set(param_path, param)
|
|
237
233
|
|
|
238
234
|
@property
|
|
239
|
-
def parameters(self) ->
|
|
235
|
+
def parameters(self) -> tuple[str, ...]:
|
|
240
236
|
"""
|
|
241
237
|
Fetches the parameters from Augeas tree, ensuring that the sequence always
|
|
242
238
|
represents the current state
|
|
@@ -246,7 +242,7 @@ class AugeasDirectiveNode(AugeasParserNode):
|
|
|
246
242
|
"""
|
|
247
243
|
return tuple(self._aug_get_params(self.metadata["augeaspath"]))
|
|
248
244
|
|
|
249
|
-
def _aug_get_params(self, path: str) ->
|
|
245
|
+
def _aug_get_params(self, path: str) -> list[str]:
|
|
250
246
|
"""Helper function to get parameters for DirectiveNodes and BlockNodes"""
|
|
251
247
|
|
|
252
248
|
arg_paths = self.parser.aug.match(path + "/arg")
|
|
@@ -259,7 +255,7 @@ class AugeasBlockNode(AugeasDirectiveNode):
|
|
|
259
255
|
|
|
260
256
|
def __init__(self, **kwargs: Any) -> None:
|
|
261
257
|
super().__init__(**kwargs)
|
|
262
|
-
self.children:
|
|
258
|
+
self.children: tuple["AugeasBlockNode", ...] = ()
|
|
263
259
|
|
|
264
260
|
def __eq__(self, other: Any) -> bool:
|
|
265
261
|
if isinstance(other, self.__class__):
|
|
@@ -275,7 +271,7 @@ class AugeasBlockNode(AugeasDirectiveNode):
|
|
|
275
271
|
|
|
276
272
|
# pylint: disable=unused-argument
|
|
277
273
|
def add_child_block(self, name: str, # pragma: no cover
|
|
278
|
-
parameters: Optional[
|
|
274
|
+
parameters: Optional[list[str]] = None,
|
|
279
275
|
position: Optional[int] = None) -> "AugeasBlockNode":
|
|
280
276
|
"""Adds a new BlockNode to the sequence of children"""
|
|
281
277
|
|
|
@@ -283,7 +279,7 @@ class AugeasBlockNode(AugeasDirectiveNode):
|
|
|
283
279
|
name,
|
|
284
280
|
position
|
|
285
281
|
)
|
|
286
|
-
new_metadata:
|
|
282
|
+
new_metadata: dict[str, Any] = {"augeasparser": self.parser, "augeaspath": realpath}
|
|
287
283
|
|
|
288
284
|
# Create the new block
|
|
289
285
|
self.parser.aug.insert(insertpath, name, before)
|
|
@@ -305,7 +301,7 @@ class AugeasBlockNode(AugeasDirectiveNode):
|
|
|
305
301
|
|
|
306
302
|
# pylint: disable=unused-argument
|
|
307
303
|
def add_child_directive(self, name: str, # pragma: no cover
|
|
308
|
-
parameters: Optional[
|
|
304
|
+
parameters: Optional[list[str]] = None,
|
|
309
305
|
position: Optional[int] = None) -> AugeasDirectiveNode:
|
|
310
306
|
"""Adds a new DirectiveNode to the sequence of children"""
|
|
311
307
|
|
|
@@ -346,7 +342,7 @@ class AugeasBlockNode(AugeasDirectiveNode):
|
|
|
346
342
|
"#comment",
|
|
347
343
|
position
|
|
348
344
|
)
|
|
349
|
-
new_metadata:
|
|
345
|
+
new_metadata: dict[str, Any] = {
|
|
350
346
|
"augeasparser": self.parser, "augeaspath": realpath,
|
|
351
347
|
}
|
|
352
348
|
|
|
@@ -362,10 +358,10 @@ class AugeasBlockNode(AugeasDirectiveNode):
|
|
|
362
358
|
metadata=new_metadata,
|
|
363
359
|
)
|
|
364
360
|
|
|
365
|
-
def find_blocks(self, name: str, exclude: bool = True) ->
|
|
361
|
+
def find_blocks(self, name: str, exclude: bool = True) -> list["AugeasBlockNode"]:
|
|
366
362
|
"""Recursive search of BlockNodes from the sequence of children"""
|
|
367
363
|
|
|
368
|
-
nodes:
|
|
364
|
+
nodes: list["AugeasBlockNode"] = []
|
|
369
365
|
paths: Iterable[str] = self._aug_find_blocks(name)
|
|
370
366
|
if exclude:
|
|
371
367
|
paths = self.parser.exclude_dirs(paths)
|
|
@@ -374,14 +370,14 @@ class AugeasBlockNode(AugeasDirectiveNode):
|
|
|
374
370
|
|
|
375
371
|
return nodes
|
|
376
372
|
|
|
377
|
-
def find_directives(self, name: str, exclude: bool = True) ->
|
|
373
|
+
def find_directives(self, name: str, exclude: bool = True) -> list["AugeasDirectiveNode"]:
|
|
378
374
|
"""Recursive search of DirectiveNodes from the sequence of children"""
|
|
379
375
|
|
|
380
376
|
nodes = []
|
|
381
377
|
ownpath = self.metadata.get("augeaspath")
|
|
382
378
|
|
|
383
379
|
directives = self.parser.find_dir(name, start=ownpath, exclude=exclude)
|
|
384
|
-
already_parsed:
|
|
380
|
+
already_parsed: set[str] = set()
|
|
385
381
|
for directive in directives:
|
|
386
382
|
# Remove the /arg part from the Augeas path
|
|
387
383
|
directive = directive.partition("/arg")[0]
|
|
@@ -393,14 +389,14 @@ class AugeasBlockNode(AugeasDirectiveNode):
|
|
|
393
389
|
|
|
394
390
|
return nodes
|
|
395
391
|
|
|
396
|
-
def find_comments(self, comment: str) ->
|
|
392
|
+
def find_comments(self, comment: str) -> list["AugeasCommentNode"]:
|
|
397
393
|
"""
|
|
398
394
|
Recursive search of DirectiveNodes from the sequence of children.
|
|
399
395
|
|
|
400
396
|
:param str comment: Comment content to search for.
|
|
401
397
|
"""
|
|
402
398
|
|
|
403
|
-
nodes:
|
|
399
|
+
nodes: list["AugeasCommentNode"] = []
|
|
404
400
|
ownpath = self.metadata.get("augeaspath")
|
|
405
401
|
|
|
406
402
|
comments = self.parser.find_comments(comment, start=ownpath)
|
|
@@ -422,11 +418,11 @@ class AugeasBlockNode(AugeasDirectiveNode):
|
|
|
422
418
|
"seem to exist.").format(child.metadata["augeaspath"])
|
|
423
419
|
)
|
|
424
420
|
|
|
425
|
-
def unsaved_files(self) ->
|
|
421
|
+
def unsaved_files(self) -> set[str]:
|
|
426
422
|
"""Returns a list of unsaved filepaths"""
|
|
427
423
|
return self.parser.unsaved_files()
|
|
428
424
|
|
|
429
|
-
def parsed_paths(self) ->
|
|
425
|
+
def parsed_paths(self) -> list[str]:
|
|
430
426
|
"""
|
|
431
427
|
Returns a list of file paths that have currently been parsed into the parser
|
|
432
428
|
tree. The returned list may include paths with wildcard characters, for
|
|
@@ -437,7 +433,7 @@ class AugeasBlockNode(AugeasDirectiveNode):
|
|
|
437
433
|
:returns: list of file paths of files that have been parsed
|
|
438
434
|
"""
|
|
439
435
|
|
|
440
|
-
res_paths:
|
|
436
|
+
res_paths: list[str] = []
|
|
441
437
|
|
|
442
438
|
paths = self.parser.existing_paths
|
|
443
439
|
for directory in paths:
|
|
@@ -463,7 +459,7 @@ class AugeasBlockNode(AugeasDirectiveNode):
|
|
|
463
459
|
"""Helper function to create a DirectiveNode from Augeas path"""
|
|
464
460
|
|
|
465
461
|
name = self.parser.get_arg(path)
|
|
466
|
-
metadata:
|
|
462
|
+
metadata: dict[str, Union[parser.ApacheParser, str]] = {
|
|
467
463
|
"augeasparser": self.parser, "augeaspath": path,
|
|
468
464
|
}
|
|
469
465
|
|
|
@@ -477,12 +473,12 @@ class AugeasBlockNode(AugeasDirectiveNode):
|
|
|
477
473
|
filepath=apache_util.get_file_path(path),
|
|
478
474
|
metadata=metadata)
|
|
479
475
|
|
|
480
|
-
def _aug_find_blocks(self, name: str) ->
|
|
476
|
+
def _aug_find_blocks(self, name: str) -> set[str]:
|
|
481
477
|
"""Helper function to perform a search to Augeas DOM tree to search
|
|
482
478
|
configuration blocks with a given name"""
|
|
483
479
|
|
|
484
480
|
# The code here is modified from configurator.get_virtual_hosts()
|
|
485
|
-
blk_paths:
|
|
481
|
+
blk_paths: set[str] = set()
|
|
486
482
|
for vhost_path in list(self.parser.parser_paths):
|
|
487
483
|
paths = self.parser.aug.match(
|
|
488
484
|
("/files%s//*[label()=~regexp('%s')]" %
|
|
@@ -492,7 +488,7 @@ class AugeasBlockNode(AugeasDirectiveNode):
|
|
|
492
488
|
return blk_paths
|
|
493
489
|
|
|
494
490
|
def _aug_resolve_child_position(
|
|
495
|
-
self, name: str, position: Optional[int]) ->
|
|
491
|
+
self, name: str, position: Optional[int]) -> tuple[str, str, bool]:
|
|
496
492
|
"""
|
|
497
493
|
Helper function that iterates through the immediate children and figures
|
|
498
494
|
out the insertion path for a new AugeasParserNode.
|