summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2020-12-14 22:57:52 -0500
committerGitHub <noreply@github.com>2020-12-14 21:57:52 -0600
commitcdbfd828fcbfdd21c61bde6ceb9db6a6329605f0 (patch)
tree8d2adb94c3fd846fc30e1e9debafaee0ea05c3c4
parent1b12dcefdd71ba81ff9c3de9899fdb73076a08d2 (diff)
downloadpyopenssl-git-cdbfd828fcbfdd21c61bde6ceb9db6a6329605f0.tar.gz
Fix for running on OpenSSL 1.1.0 + CI (#978)
* Test on OpenSSL 1.1.0 w/ Debian stretch * Make pyOpenSSL compatible with openssl 1.1.0 again Co-authored-by: Shane Harvey <shnhrv@gmail.com>
-rw-r--r--.github/workflows/ci.yml19
-rw-r--r--src/OpenSSL/SSL.py5
2 files changed, 23 insertions, 1 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3d372cf..b65b728 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -58,3 +58,22 @@ jobs:
run: |
curl -o codecov.sh -f https://codecov.io/bash || curl -o codecov.sh -f https://codecov.io/bash || curl -o codecov.sh -f https://codecov.io/bash
bash codecov.sh -n "tox -e ${{ matrix.PYTHON.TOXENV }}"
+
+ linux-docker:
+ runs-on: ubuntu-latest
+ container: ghcr.io/pyca/cryptography-runner-${{ matrix.TEST.CONTAINER }}
+ strategy:
+ matrix:
+ TEST:
+ - {CONTAINER: "stretch", TOXENV: "py27"}
+ - {CONTAINER: "stretch", TOXENV: "py35"}
+ name: "${{ matrix.TEST.TOXENV }} on ${{ matrix.TEST.CONTAINER }}"
+ steps:
+ - uses: actions/checkout@v2
+ - run: tox -v
+ env:
+ TOXENV: ${{ matrix.TEST.TOXENV }}
+ - name: Upload coverage
+ run: |
+ curl -o codecov.sh -f https://codecov.io/bash || curl -o codecov.sh -f https://codecov.io/bash || curl -o codecov.sh -f https://codecov.io/bash
+ bash codecov.sh -n "tox -e ${{ matrix.TEST.TOXENV }} on ${{ matrix.TEST.CONTAINER }}"
diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py
index 230b403..e5fea1e 100644
--- a/src/OpenSSL/SSL.py
+++ b/src/OpenSSL/SSL.py
@@ -146,7 +146,10 @@ OP_NO_SSLv3 = _lib.SSL_OP_NO_SSLv3
OP_NO_TLSv1 = _lib.SSL_OP_NO_TLSv1
OP_NO_TLSv1_1 = _lib.SSL_OP_NO_TLSv1_1
OP_NO_TLSv1_2 = _lib.SSL_OP_NO_TLSv1_2
-OP_NO_TLSv1_3 = _lib.SSL_OP_NO_TLSv1_3
+try:
+ OP_NO_TLSv1_3 = _lib.SSL_OP_NO_TLSv1_3
+except AttributeError:
+ pass
MODE_RELEASE_BUFFERS = _lib.SSL_MODE_RELEASE_BUFFERS