@@ -291,7 +291,7 @@ jobs:
291291 os : ${{ matrix.os }}
292292
293293 build-ubuntu-ssltests :
294- name : ' Ubuntu SSL tests with OpenSSL '
294+ name : ' Ubuntu SSL tests'
295295 runs-on : ${{ matrix.os }}
296296 timeout-minutes : 60
297297 needs : build-context
@@ -300,16 +300,23 @@ jobs:
300300 fail-fast : false
301301 matrix :
302302 os : [ubuntu-24.04]
303- # Keep 1.1.1w in our list despite it being upstream EOL and otherwise
304- # unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
305- # supported by important vendors such as AWS-LC.
306- openssl_ver : [1.1.1w, 3.0.19, 3.3.6, 3.4.4, 3.5.5, 3.6.1]
307- # See Tools/ssl/make_ssl_data.py for notes on adding a new version
303+ ssllib :
304+ # See Tools/ssl/make_ssl_data.py for notes on adding a new version
305+ # # OpenSSL
306+ # Keep 1.1.1w in our list despite it being upstream EOL and otherwise
307+ # unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
308+ # supported by important vendors such as AWS-LC.
309+ - { name: openssl, version: 1.1.1w }
310+ - { name: openssl, version: 3.0.19 }
311+ - { name: openssl, version: 3.3.6 }
312+ - { name: openssl, version: 3.4.4 }
313+ - { name: openssl, version: 3.5.5 }
314+ - { name: openssl, version: 3.6.1 }
308315 env :
309- OPENSSL_VER : ${{ matrix.openssl_ver }}
316+ SSLLIB_VER : ${{ matrix.ssllib.version }}
310317 MULTISSL_DIR : ${{ github.workspace }}/multissl
311- OPENSSL_DIR : ${{ github.workspace }}/multissl/openssl /${{ matrix.openssl_ver }}
312- LD_LIBRARY_PATH : ${{ github.workspace }}/multissl/openssl /${{ matrix.openssl_ver }}/lib
318+ SSLLIB_DIR : ${{ github.workspace }}/multissl/${{ matrix.ssllib.name }} /${{ matrix.ssllib.version }}
319+ LD_LIBRARY_PATH : ${{ github.workspace }}/multissl/${{ matrix.ssllib.name }} /${{ matrix.ssllib.version }}/lib
313320 steps :
314321 - uses : actions/checkout@v6
315322 with :
@@ -320,29 +327,37 @@ jobs:
320327 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
321328 - name : Install dependencies
322329 run : sudo ./.github/workflows/posix-deps-apt.sh
323- - name : Configure OpenSSL env vars
324- run : |
325- echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV"
326- echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> "$GITHUB_ENV"
327- echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
328- - name : ' Restore OpenSSL build'
329- id : cache-openssl
330+ - name : ' Restore SSL library build'
331+ id : cache-ssl-lib
330332 uses : actions/cache@v5
331333 with :
332- path : ./multissl/openssl/${{ env.OPENSSL_VER }}
333- key : ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
334- - name : Install OpenSSL
335- if : steps.cache-openssl.outputs.cache-hit != 'true'
336- run : python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
337- - name : Add ccache to PATH
334+ path : ./multissl/${{ matrix.ssllib.name }}/${{ matrix.ssllib.version }}
335+ key : ${{ matrix.os }}-multissl-${{ matrix.ssllib.name }}-${{ matrix.ssllib.version }}
336+ - name : Install SSL Library
337+ if : steps.cache-ssl-lib.outputs.cache-hit != 'true'
338338 run : |
339- echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
339+ python3 Tools/ssl/multissltests.py \
340+ --steps=library \
341+ --base-directory "$MULTISSL_DIR" \
342+ '--${{ matrix.ssllib.name }}' '${{ matrix.ssllib.version }}' \
343+ --system Linux
340344 - name : Configure CPython
341- run : ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$OPENSSL_DIR"
345+ run : |
346+ ./configure CFLAGS="-fdiagnostics-format=json" \
347+ --config-cache \
348+ --enable-slower-safety \
349+ --with-pydebug \
350+ --with-openssl="$SSLLIB_DIR" \
351+ --with-builtin-hashlib-hashes=blake2 \
352+ --with-ssl-default-suites=openssl
342353 - name : Build CPython
343354 run : make -j4
344355 - name : Display build info
345356 run : make pythoninfo
357+ - name : Verify python is linked to the right lib
358+ run : |
359+ ./python -c 'import ssl; print(ssl.OPENSSL_VERSION)' \
360+ | grep -iE '${{ matrix.ssllib.name }}.*${{ matrix.ssllib.version }}'
346361 - name : SSL tests
347362 run : ./python Lib/test/ssltests.py
348363
0 commit comments