Skip to content

Commit

Permalink
pythongh-127330: Update for OpenSSL 3.4 & document+improve the update…
Browse files Browse the repository at this point in the history
… process (pythonGH-127331)

- Add `git describe` output to headers generated by `make_ssl_data.py`

  This info is more important than the date when the file was generated.
  It does mean that the tool now requires a Git checkout of OpenSSL,
  not for example a release tarball.

- Regenerate the older file to add the info.
  To the other older file, add a note about manual edits.

- Add notes on how to add a new OpenSSL version

- Add 3.4 error messages and multissl tests
  • Loading branch information
encukou authored and ebonnal committed Jan 10, 2025
1 parent 3ac3b13 commit f716e46
Show file tree
Hide file tree
Showing 9 changed files with 719 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-24.04]
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2]
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2, 3.4.0]
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
env:
OPENSSL_VER: ${{ matrix.openssl_ver }}
MULTISSL_DIR: ${{ github.workspace }}/multissl
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
:mod:`ssl` can show descriptions for errors added in OpenSSL 3.4.
3 changes: 2 additions & 1 deletion Modules/_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ static void _PySSLFixErrno(void) {
#endif

/* Include generated data (error codes) */
/* See make_ssl_data.h for notes on adding a new version. */
#if (OPENSSL_VERSION_NUMBER >= 0x30100000L)
#include "_ssl_data_31.h"
#include "_ssl_data_34.h"
#elif (OPENSSL_VERSION_NUMBER >= 0x30000000L)
#include "_ssl_data_300.h"
#elif (OPENSSL_VERSION_NUMBER >= 0x10101000L)
Expand Down
4 changes: 3 additions & 1 deletion Modules/_ssl_data_111.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/* File generated by Tools/ssl/make_ssl_data.py *//* Generated on 2023-06-01T02:58:04.081473 */
/* File generated by Tools/ssl/make_ssl_data.py */
/* Generated on 2024-11-27T12:48:46.194048+00:00 */
/* Generated from Git commit OpenSSL_1_1_1w-0-ge04bd3433f */
static struct py_ssl_library_code library_codes[] = {
#ifdef ERR_LIB_ASN1
{"ASN1", ERR_LIB_ASN1},
Expand Down
5 changes: 4 additions & 1 deletion Modules/_ssl_data_300.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/* File generated by Tools/ssl/make_ssl_data.py *//* Generated on 2023-06-01T03:03:52.163218 */
/* File generated by Tools/ssl/make_ssl_data.py */
/* Generated on 2023-06-01T03:03:52.163218 */
/* Manually edited to add definitions from 1.1.1 (GH-105174) */

static struct py_ssl_library_code library_codes[] = {
#ifdef ERR_LIB_ASN1
{"ASN1", ERR_LIB_ASN1},
Expand Down
Loading

0 comments on commit f716e46

Please sign in to comment.