Skip to content

Commit 7ebe9aa

Browse files
committed
Add notes on adding a new OpenSSL version
1 parent 318838a commit 7ebe9aa

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ jobs:
251251
matrix:
252252
os: [ubuntu-24.04]
253253
openssl_ver: [3.0.15, 3.1.7, 3.2.3, 3.3.2]
254+
# See Tools/ssl/make_ssl_data.py for notes on adding a new version
254255
env:
255256
OPENSSL_VER: ${{ matrix.openssl_ver }}
256257
MULTISSL_DIR: ${{ github.workspace }}/multissl

Modules/_ssl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ static void _PySSLFixErrno(void) {
120120
#endif
121121

122122
/* Include generated data (error codes) */
123+
/* See make_ssl_data.h for notes on adding a new version. */
123124
#if (OPENSSL_VERSION_NUMBER >= 0x30100000L)
124125
#include "_ssl_data_31.h"
125126
#elif (OPENSSL_VERSION_NUMBER >= 0x30000000L)

Tools/ssl/make_ssl_data.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,25 @@
88
- the path to the OpenSSL git checkout
99
- the path to the header file to be generated Modules/_ssl_data_{version}.h
1010
- error codes are version specific
11+
12+
The OpenSSL git checkout should be at a specific tag, using commands like:
13+
git tag --list 'openssl-*'
14+
git switch --detach openssl-3.4.0
15+
16+
17+
After generating the definitions, the result with newest pre-existing file.
18+
You can use a command like:
19+
20+
git diff --no-index Modules/_ssl_data_31.h Modules/_ssl_data_34.h
21+
22+
- If the new version *only* adds new definitions, remove the pre-existing file
23+
and adjust the #include in _ssl.c to point to the new version.
24+
- If the new version removes or renumbers some definitions, keep both files and
25+
add a new #include in _ssl.c.
26+
27+
A newly supported OpenSSL version should alsko be added to:
28+
- Tools/ssl/multissltests.py
29+
- .github/workflows/build.yml
1130
"""
1231

1332
import argparse

Tools/ssl/multissltests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"3.1.7",
5252
"3.2.3",
5353
"3.3.2",
54+
# See make_ssl_data.py for notes on adding a new version.
5455
]
5556

5657
LIBRESSL_OLD_VERSIONS = [

0 commit comments

Comments
 (0)