GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 3.7.17.9: move the 3.7 line to OpenSSL 3 (#126) · ActiveState/cpython@20146c9

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Doc
    • library
      • ssl.rst
    • whatsnew
      • 3.7.rst
  • Include
    • patchlevel.h
  • Lib/test
    • test_ssl.py
  • Misc/NEWS.d/next
    • Library
      • 2020-03-19-16-33-03.bpo-39953.yy5lC_.rst
      • 2021-04-09-12-08-01.bpo-43788.YsvInM.rst
      • 2021-04-09-14-08-03.bpo-43789.eaHlAm.rst
      • 2021-04-09-16-14-22.bpo-43794.-1XPDH.rst
    • Tests
      • 2020-09-18-16-14-03.bpo-41561.uPnwrW.rst
      • 2021-04-09-15-10-38.bpo-43791.4KxiXK.rst
      • 2021-12-17-14-46-19.bpo-46114.9iyZ_9.rst
  • Modules
    • _ssl.c
    • _ssl_data.h
    • _ssl_data_111.h
    • _ssl_data_300.h
  • PCbuild
    • openssl.props
    • python.props
  • Tools/ssl
    • make_ssl_data.py
  • setup.py
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Doc/library/ssl.rst‎

Copy file name to clipboardExpand all lines: Doc/library/ssl.rst
+8Lines changed: 8 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,14 @@ Constants
878878

879879
.. versionadded:: 3.6
880880

881+
.. data:: OP_IGNORE_UNEXPECTED_EOF
882+
883+
Ignore unexpected shutdown of TLS connections.
884+
885+
This option is only available with OpenSSL 3.0.0 and later.
886+
887+
.. versionadded:: 3.7.17.9
888+
881889
.. data:: HAS_ALPN
882890

883891
Whether the OpenSSL library has built-in support for the *Application-Layer
Collapse file

‎Doc/whatsnew/3.7.rst‎

Copy file name to clipboardExpand all lines: Doc/whatsnew/3.7.rst
+57-8Lines changed: 57 additions & 8 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2664,7 +2664,7 @@ Notable security feature in 3.7.17.7
26642664
the CVE-2023-27043 fix.)
26652665

26662666
Notable changes in 3.7.17.4
2667-
=========================
2667+
===========================
26682668

26692669
tarfile
26702670
-------
@@ -2691,45 +2691,41 @@ cert-store
26912691
* Fixed CVE-2024-0397 Fix locking in ``cert_store_stats`` and ``get_ca_certs``
26922692

26932693
Notable changes in 3.7.17.5
2694-
=========================
2694+
===========================
26952695

26962696
pyexpat / libexpat
26972697
------------------
26982698

26992699
* Upgrade bundled libexpat to 2.6.3 to fix CVE-2024-28757, CVE-2024-45490, CVE-2024-45491 and CVE-2024-45492.
27002700

27012701
Notable changes in 3.7.17.6
2702-
=========================
2702+
===========================
27032703

27042704
pyexpat / libexpat
27052705
------------------
27062706

27072707
* Upgrade bundled libexpat to 2.6.4 to fix CVE-2024-50602.
27082708

27092709
Notable changes in 3.7.17.7
2710-
=========================
2710+
===========================
27112711

27122712
Fixes for these CVEs:
27132713

27142714
CVE-2023-27043
27152715

27162716
A vulnerability in Python's email module (up to version 3.11.3) causes incorrect parsing of email addresses containing special characters. This flaw misidentifies parts of RFC2822 headers, potentially allowing attackers to bypass domain-based email verification mechanisms in applications that restrict access to specific domains.
2717-
NVD
27182717

27192718
CVE-2024-6232
27202719

27212720
The tarfile module in CPython is susceptible to a Regular Expression Denial of Service (ReDoS) vulnerability due to inefficient regular expressions used during header parsing. Specifically crafted tar archives can trigger excessive backtracking, leading to significant CPU resource consumption and potential denial of service.
2722-
NVD+5SUSE+5linux.oracle.com+5
27232721

27242722
CVE-2024-7592
27252723

27262724
A vulnerability in Python's http.cookies module arises when parsing cookie values containing backslashes within quoted strings. The parser employs an algorithm with quadratic complexity, which can be exploited to cause excessive CPU usage, resulting in a denial of service.
2727-
NVD+1Ubuntu+1
27282725

27292726
CVE-2024-9287
27302727

27312728
In CPython's venv module, improper quoting of path names during virtual environment creation allows for command injection into activation scripts (e.g., source venv/bin/activate). This vulnerability enables attackers to execute arbitrary commands when such a virtual environment is activated. Virtual environments not created by an attacker or not activated before use are unaffected.
2732-
starwindsoftware.com+2
27332729

27342730
Notable changes in 3.7.17.8
27352731
===========================
@@ -2945,3 +2941,56 @@ exists in later versions (``zipfile.Path``, ``SourcelessFileLoader`` audit
29452941
hooks and :func:`io.open_code`, :mod:`asyncio` UDP and introspection APIs,
29462942
``getpath.py``), and the behavior changes upstream kept to 3.13 and later
29472943
(:mod:`base64` decoding, ``Morsel.js_output``).
2944+
2945+
Notable changes in 3.7.17.9
2946+
===========================
2947+
2948+
This ActiveState release moves the 3.7 line from OpenSSL 1.1.1, which
2949+
reached its end of life in September 2023, to OpenSSL 3. The ActiveState
2950+
3.9 and 3.10 lines already build against OpenSSL 3. The source still
2951+
builds against OpenSSL 1.1.1.
2952+
2953+
ssl
2954+
---
2955+
2956+
* With OpenSSL 3, a peer that closes the connection without sending a TLS
2957+
``close_notify`` alert ends the stream like a plain end of file, as it does
2958+
with OpenSSL 1.1.1, instead of raising
2959+
``SSLError: unexpected eof while reading``. :data:`ssl.OP_IGNORE_UNEXPECTED_EOF`
2960+
is set by default. (:issue:`43794`)
2961+
* The error codes table is regenerated per OpenSSL version, so
2962+
:class:`ssl.SSLError` reports the right library and reason with OpenSSL 3
2963+
instead of misnamed ones such as ``KRB5_S_TKT_NYV``. (:issue:`39953`,
2964+
:issue:`40266`, :issue:`43788`)
2965+
* :meth:`~ssl.SSLContext.load_cert_chain` no longer calls the password
2966+
callback a second time after it fails. (:issue:`43789`)
2967+
2968+
Behavior changes from OpenSSL 3
2969+
-------------------------------
2970+
2971+
These come from OpenSSL 3 itself and match the ActiveState 3.9 and 3.10
2972+
lines:
2973+
2974+
* At OpenSSL's default security level, TLS 1.0 and 1.1 and SHA-1
2975+
signatures are refused, and so are RSA keys shorter than 2048 bits on
2976+
OpenSSL 3.2 and later (the Platform builds with 3.5), or shorter than 1024
2977+
bits on 3.0 and 3.1, whose default level is lower. Connecting to a server
2978+
that needs them fails until the context lowers the level, for example with
2979+
``ctx.set_ciphers("DEFAULT:@SECLEVEL=0")``.
2980+
* Algorithms that OpenSSL 3 moved to its legacy provider are no longer
2981+
available unless that provider is loaded through an OpenSSL
2982+
configuration file. ``hashlib.new("md4")`` and ``hashlib.new("whirlpool")``
2983+
raise :exc:`ValueError`, and they are not listed in
2984+
:data:`hashlib.algorithms_available`. MD4 is used for NTLM
2985+
authentication.
2986+
* Extension modules that link OpenSSL, such as ``cryptography``,
2987+
``pyOpenSSL`` and ``psycopg2``, must be built against OpenSSL 3. Older
2988+
releases that do not support OpenSSL 3 (for example ``cryptography``
2989+
before 35.0) no longer build.
2990+
2991+
Build
2992+
-----
2993+
2994+
* On Windows, the build copies the OpenSSL DLLs that match the OpenSSL
2995+
version in use (``libssl-3.dll`` for 3.x, ``libssl-1_1.dll`` for 1.1),
2996+
from its ``bin`` directory when it has one.
Collapse file

‎Include/patchlevel.h‎

Copy file name to clipboardExpand all lines: Include/patchlevel.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#define PY_RELEASE_SERIAL 0
2424

2525
/* Version as a string */
26-
#define PY_VERSION "3.7.17.8"
26+
#define PY_VERSION "3.7.17.9"
2727
/*--end constants--*/
2828

2929
/* Version as a single 4-byte hex number, e.g. 0x010502B2 == 1.5.2b2.
Collapse file

‎Lib/test/test_ssl.py‎

Copy file name to clipboardExpand all lines: Lib/test/test_ssl.py
+18-7Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
IS_LIBRESSL = ssl.OPENSSL_VERSION.startswith('LibreSSL')
4040
IS_OPENSSL_1_1_0 = not IS_LIBRESSL and ssl.OPENSSL_VERSION_INFO >= (1, 1, 0)
4141
IS_OPENSSL_1_1_1 = not IS_LIBRESSL and ssl.OPENSSL_VERSION_INFO >= (1, 1, 1)
42+
IS_OPENSSL_3_0_0 = not IS_LIBRESSL and ssl.OPENSSL_VERSION_INFO >= (3, 0, 0)
4243
PY_SSL_DEFAULT_CIPHERS = sysconfig.get_config_var('PY_SSL_DEFAULT_CIPHERS')
4344

4445
PROTOCOL_TO_TLS_VERSION = {}
@@ -160,6 +161,7 @@ def data_file(*name):
160161
OP_SINGLE_ECDH_USE = getattr(ssl, "OP_SINGLE_ECDH_USE", 0)
161162
OP_CIPHER_SERVER_PREFERENCE = getattr(ssl, "OP_CIPHER_SERVER_PREFERENCE", 0)
162163
OP_ENABLE_MIDDLEBOX_COMPAT = getattr(ssl, "OP_ENABLE_MIDDLEBOX_COMPAT", 0)
164+
OP_IGNORE_UNEXPECTED_EOF = getattr(ssl, "OP_IGNORE_UNEXPECTED_EOF", 0)
163165

164166
# Ubuntu has patched OpenSSL and changed behavior of security level 2
165167
# see https://bugs.python.org/issue41561#msg389003
@@ -225,6 +227,10 @@ def has_tls_version(version):
225227
if not getattr(ssl, f'HAS_{version.name}'):
226228
return False
227229

230+
if IS_OPENSSL_3_0_0 and version < ssl.TLSVersion.TLSv1_2:
231+
# bpo43791: 3.0.0-alpha14 fails with TLSV1_ALERT_INTERNAL_ERROR
232+
return False
233+
228234
# check runtime and dynamic crypto policy settings. A TLS version may
229235
# be compiled in but disabled by a policy or config option.
230236
ctx = ssl.SSLContext()
@@ -638,13 +644,16 @@ def test_openssl_version(self):
638644
self.assertLessEqual(patch, 63)
639645
self.assertGreaterEqual(status, 0)
640646
self.assertLessEqual(status, 15)
641-
# Version string as returned by {Open,Libre}SSL, the format might change
642-
if IS_LIBRESSL:
643-
self.assertTrue(s.startswith("LibreSSL {:d}".format(major)),
644-
(s, t, hex(n)))
647+
libressl_ver = f"LibreSSL {major:d}"
648+
if major >= 3:
649+
# 3.x uses 0xMNN00PP0L
650+
openssl_ver = f"OpenSSL {major:d}.{minor:d}.{patch:d}"
645651
else:
646-
self.assertTrue(s.startswith("OpenSSL {:d}.{:d}.{:d}".format(major, minor, fix)),
647-
(s, t, hex(n)))
652+
openssl_ver = f"OpenSSL {major:d}.{minor:d}.{fix:d}"
653+
self.assertTrue(
654+
s.startswith((openssl_ver, libressl_ver)),
655+
(s, t, hex(n))
656+
)
648657

649658
@support.cpython_only
650659
def test_refcycle(self):
@@ -1230,7 +1239,8 @@ def test_options(self):
12301239
# SSLContext also enables these by default
12311240
default |= (OP_NO_COMPRESSION | OP_CIPHER_SERVER_PREFERENCE |
12321241
OP_SINGLE_DH_USE | OP_SINGLE_ECDH_USE |
1233-
OP_ENABLE_MIDDLEBOX_COMPAT)
1242+
OP_ENABLE_MIDDLEBOX_COMPAT |
1243+
OP_IGNORE_UNEXPECTED_EOF)
12341244
self.assertEqual(default, ctx.options)
12351245
ctx.options |= ssl.OP_NO_TLSv1
12361246
self.assertEqual(default | ssl.OP_NO_TLSv1, ctx.options)
@@ -4087,6 +4097,7 @@ def test_min_max_version_tlsv1_1(self):
40874097

40884098
@requires_minimum_version
40894099
@requires_tls_version('TLSv1_2')
4100+
@requires_tls_version('TLSv1')
40904101
def test_min_max_version_mismatch(self):
40914102
client_context, server_context, hostname = testing_context()
40924103
# client 1.0, server 1.2 (mismatch)
Collapse file

‎Misc/NEWS.d/next/Library/2020-03-19-16-33-03.bpo-39953.yy5lC_.rst‎

Copy file name to clipboard
+1Lines changed: 1 addition & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Update internal table of OpenSSL error codes in the ``ssl`` module.
Collapse file

‎Misc/NEWS.d/next/Library/2021-04-09-12-08-01.bpo-43788.YsvInM.rst‎

Copy file name to clipboard
+4Lines changed: 4 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The header files for :mod:`ssl` error codes are now OpenSSL
2+
version-specific. Exceptions will now show correct reason and library
3+
codes. The ``make_ssl_data.py`` script has been rewritten to use OpenSSL's
4+
text file with error codes.
Collapse file

‎Misc/NEWS.d/next/Library/2021-04-09-14-08-03.bpo-43789.eaHlAm.rst‎

Copy file name to clipboard
+2Lines changed: 2 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
OpenSSL 3.0.0: Don't call the password callback function a second time when
2+
first call has signaled an error condition.
Collapse file

‎Misc/NEWS.d/next/Library/2021-04-09-16-14-22.bpo-43794.-1XPDH.rst‎

Copy file name to clipboard
+1Lines changed: 1 addition & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add :data:`ssl.OP_IGNORE_UNEXPECTED_EOF` constants (OpenSSL 3.0.0)
Collapse file

‎Misc/NEWS.d/next/Tests/2020-09-18-16-14-03.bpo-41561.uPnwrW.rst‎

Copy file name to clipboard
+1Lines changed: 1 addition & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
test_ssl: skip test_min_max_version_mismatch when TLS 1.0 is not available
Collapse file

‎Misc/NEWS.d/next/Tests/2021-04-09-15-10-38.bpo-43791.4KxiXK.rst‎

Copy file name to clipboard
+2Lines changed: 2 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
OpenSSL 3.0.0: Disable testing of legacy protocols TLS 1.0 and 1.1. Tests
2+
are failing with TLSV1_ALERT_INTERNAL_ERROR.

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.