@@ -289,7 +289,7 @@ jobs:
289289 os : ${{ matrix.os }}
290290
291291 build-ubuntu-ssltests :
292- name : ' Ubuntu SSL tests with OpenSSL '
292+ name : ' Ubuntu SSL tests'
293293 runs-on : ${{ matrix.os }}
294294 timeout-minutes : 60
295295 needs : build-context
@@ -298,16 +298,23 @@ jobs:
298298 fail-fast : false
299299 matrix :
300300 os : [ubuntu-24.04]
301- # Keep 1.1.1w in our list despite it being upstream EOL and otherwise
302- # unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
303- # supported by important vendors such as AWS-LC.
304- openssl_ver : [1.1.1w, 3.0.19, 3.3.6, 3.4.4, 3.5.5, 3.6.1]
305- # See Tools/ssl/make_ssl_data.py for notes on adding a new version
301+ ssllib :
302+ # See Tools/ssl/make_ssl_data.py for notes on adding a new version
303+ # # OpenSSL
304+ # Keep 1.1.1w in our list despite it being upstream EOL and otherwise
305+ # unsupported as it most resembles other 1.1.1-work-a-like ssl APIs
306+ # supported by important vendors such as AWS-LC.
307+ - { name: openssl, version: 1.1.1w }
308+ - { name: openssl, version: 3.0.19 }
309+ - { name: openssl, version: 3.3.6 }
310+ - { name: openssl, version: 3.4.4 }
311+ - { name: openssl, version: 3.5.5 }
312+ - { name: openssl, version: 3.6.1 }
306313 env :
307- OPENSSL_VER : ${{ matrix.openssl_ver }}
314+ SSLLIB_VER : ${{ matrix.ssllib.version }}
308315 MULTISSL_DIR : ${{ github.workspace }}/multissl
309- OPENSSL_DIR : ${{ github.workspace }}/multissl/openssl /${{ matrix.openssl_ver }}
310- LD_LIBRARY_PATH : ${{ github.workspace }}/multissl/openssl /${{ matrix.openssl_ver }}/lib
316+ SSLLIB_DIR : ${{ github.workspace }}/multissl/${{ matrix.ssllib.name }} /${{ matrix.ssllib.version }}
317+ LD_LIBRARY_PATH : ${{ github.workspace }}/multissl/${{ matrix.ssllib.name }} /${{ matrix.ssllib.version }}/lib
311318 steps :
312319 - uses : actions/checkout@v6
313320 with :
@@ -318,26 +325,37 @@ jobs:
318325 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
319326 - name : Install dependencies
320327 run : sudo ./.github/workflows/posix-deps-apt.sh
321- - name : Configure OpenSSL env vars
322- run : |
323- echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> "$GITHUB_ENV"
324- echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> "$GITHUB_ENV"
325- echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> "$GITHUB_ENV"
326- - name : ' Restore OpenSSL build'
327- id : cache-openssl
328+ - name : ' Restore SSL library build'
329+ id : cache-ssl-lib
328330 uses : actions/cache@v5
329331 with :
330- path : ./multissl/openssl/${{ env.OPENSSL_VER }}
331- key : ${{ matrix.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
332- - name : Install OpenSSL
333- if : steps.cache-openssl.outputs.cache-hit != 'true'
334- run : python3 Tools/ssl/multissltests.py --steps=library --base-directory "$MULTISSL_DIR" --openssl "$OPENSSL_VER" --system Linux
332+ path : ./multissl/${{ matrix.ssllib.name }}/${{ matrix.ssllib.version }}
333+ key : ${{ matrix.os }}-multissl-${{ matrix.ssllib.name }}-${{ matrix.ssllib.version }}
334+ - name : Install SSL Library
335+ if : steps.cache-ssl-lib.outputs.cache-hit != 'true'
336+ run : |
337+ python3 Tools/ssl/multissltests.py \
338+ --steps=library \
339+ --base-directory "$MULTISSL_DIR" \
340+ '--${{ matrix.ssllib.name }}' '${{ matrix.ssllib.version }}' \
341+ --system Linux
335342 - name : Configure CPython
336- run : ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$OPENSSL_DIR"
343+ run : |
344+ ./configure CFLAGS="-fdiagnostics-format=json" \
345+ --config-cache \
346+ --enable-slower-safety \
347+ --with-pydebug \
348+ --with-openssl="$SSLLIB_DIR" \
349+ --with-builtin-hashlib-hashes=blake2 \
350+ --with-ssl-default-suites=openssl
337351 - name : Build CPython
338352 run : make -j4
339353 - name : Display build info
340354 run : make pythoninfo
355+ - name : Verify python is linked to the right lib
356+ run : |
357+ ./python -c 'import ssl; print(ssl.OPENSSL_VERSION)' \
358+ | grep -iE '${{ matrix.ssllib.name }}.*${{ matrix.ssllib.version }}'
341359 - name : SSL tests
342360 run : ./python Lib/test/ssltests.py
343361
0 commit comments