mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 19:02:52 +02:00
remove python 3.9 support (#10406)
Fixes https://github.com/certbot/certbot/issues/10389. you can compare this to the PR that did this for python 3.8 at https://github.com/certbot/certbot/pull/10077 additional changes: - linux-py310 test is removed from extended tests, since it's now run in standard tests. additionally, openssl will never be < 1.1.1 now, due to https://peps.python.org/pep-0644/. - `letstest/scripts/test_openssl_version.py` was testing functionality that was removed in https://github.com/certbot/certbot/pull/10373 so it was deleted --------- Co-authored-by: Brad Warren <bmw@users.noreply.github.com>
This commit is contained in:
co-authored by
Brad Warren
parent
c519307569
commit
5d05984dd9
@@ -48,10 +48,8 @@ eval "$(pyenv init --path)"
|
||||
eval "$(pyenv init -)"
|
||||
|
||||
# Install and configure Python
|
||||
# Python<=3.9 must be used because Python 3.10 requires too new of a version of
|
||||
# OpenSSL.
|
||||
pyenv install 3.9.10
|
||||
pyenv shell 3.9.10
|
||||
pyenv install 3.10
|
||||
pyenv shell 3.10
|
||||
|
||||
tools/venv.py -e acme -e certbot -e certbot-apache -e certbot-ci tox
|
||||
PEBBLE_LOGS="acme_server.log"
|
||||
@@ -92,18 +90,10 @@ sudo "venv/bin/certbot" -v --debug --text --agree-tos --no-verify-ssl \
|
||||
--renew-by-default --redirect --register-unsafely-without-email \
|
||||
--domain "${PUBLIC_HOSTNAME}" --server "${PEBBLE_URL}"
|
||||
|
||||
# Check that ssl_module detection is working on various systems
|
||||
if [ "$OS_TYPE" = "ubuntu" ] ; then
|
||||
MOD_SSL_LOCATION="/usr/lib/apache2/modules/mod_ssl.so"
|
||||
APACHE_NAME=apache2ctl
|
||||
elif [ "$OS_TYPE" = "centos" ]; then
|
||||
MOD_SSL_LOCATION="/etc/httpd/modules/mod_ssl.so"
|
||||
APACHE_NAME=httpd
|
||||
if ! grep -q SSLSessionTickets /etc/letsencrypt/options-ssl-apache.conf; then
|
||||
echo "modern TLS options were not used"
|
||||
exit 1
|
||||
fi
|
||||
OPENSSL_VERSION=$(strings "$MOD_SSL_LOCATION" | egrep -o -m1 '^OpenSSL ([0-9]\.[^ ]+) ' | tail -c +9)
|
||||
APACHE_VERSION=$(sudo $APACHE_NAME -v | egrep -o 'Apache/([0-9]\.[^ ]+)' | tail -c +8)
|
||||
"venv/bin/python" letstest/scripts/test_openssl_version.py "$OPENSSL_VERSION" "$APACHE_VERSION"
|
||||
|
||||
|
||||
if [ "$OS_TYPE" = "ubuntu" ] ; then
|
||||
export SERVER="${PEBBLE_URL}"
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# Test script for OpenSSL version checking
|
||||
import sys
|
||||
|
||||
from certbot import util
|
||||
|
||||
|
||||
def main(openssl_version, apache_version):
|
||||
if not openssl_version.strip():
|
||||
raise Exception("No OpenSSL version found.")
|
||||
if not apache_version.strip():
|
||||
raise Exception("No Apache version found.")
|
||||
conf_file_location = "/etc/letsencrypt/options-ssl-apache.conf"
|
||||
with open(conf_file_location) as f:
|
||||
contents = f.read()
|
||||
if util.parse_loose_version(apache_version.strip()) < util.parse_loose_version('2.4.11') or \
|
||||
util.parse_loose_version(openssl_version.strip()) < util.parse_loose_version('1.0.2l'):
|
||||
# should be old version
|
||||
# assert SSLSessionTickets not in conf file
|
||||
if "SSLSessionTickets" in contents:
|
||||
raise Exception("Apache or OpenSSL version is too old, "
|
||||
"but SSLSessionTickets is set.")
|
||||
else:
|
||||
# should be current version
|
||||
# assert SSLSessionTickets in conf file
|
||||
if "SSLSessionTickets" not in contents:
|
||||
raise Exception("Apache and OpenSSL versions are sufficiently new, "
|
||||
"but SSLSessionTickets is not set.")
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(*sys.argv[1:])
|
||||
+1
-2
@@ -9,14 +9,13 @@ setup(
|
||||
author='Certbot Project',
|
||||
author_email='certbot-dev@eff.org',
|
||||
license='Apache License 2.0',
|
||||
python_requires='>=3.9.2',
|
||||
python_requires='>=3.10',
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Intended Audience :: Developers',
|
||||
'License :: OSI Approved :: Apache Software License',
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.9',
|
||||
'Programming Language :: Python :: 3.10',
|
||||
'Programming Language :: Python :: 3.11',
|
||||
'Programming Language :: Python :: 3.12',
|
||||
|
||||
Reference in New Issue
Block a user