Skip to content

Commit 77debda

Browse files
authored
Drop OpenSSL 1.0.1 (#908)
1 parent 98c57be commit 77debda

File tree

5 files changed

+198
-236
lines changed

5 files changed

+198
-236
lines changed

.travis.yml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ matrix:
1515
- language: generic
1616
os: osx
1717
osx_image: xcode10.1
18-
env: TOXENV=py27 OPENSSL=1.1.1
19-
- python: "2.7" # these are just to make travis's UI a bit prettier
2018
env: TOXENV=py27
21-
dist: trusty # For OpenSSL 1.0.1 coverage
2219
- python: "2.7"
2320
env: TOXENV=py27
2421
- python: "3.5"
@@ -108,11 +105,7 @@ install:
108105
- |
109106
if [[ "$(uname -s)" == 'Darwin' ]]; then
110107
brew update
111-
if [[ "${OPENSSL}" == "1.1.1" ]]; then
112-
brew upgrade [email protected]
113-
else
114-
brew upgrade openssl
115-
fi
108+
brew upgrade [email protected]
116109
curl -O https://bootstrap.pypa.io/get-pip.py
117110
python get-pip.py --user
118111
python -m pip install --user virtualenv
@@ -126,15 +119,9 @@ script:
126119
- |
127120
if [[ "$(uname -s)" == 'Darwin' ]]; then
128121
# set our flags to use homebrew openssl
129-
if [[ "${OPENSSL}" == "1.1.1" ]]; then
130-
export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
131-
export CFLAGS="-I/usr/local/opt/[email protected]/include"
132-
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
133-
else
134-
export LDFLAGS="-L/usr/local/opt/openssl/lib"
135-
export CFLAGS="-I/usr/local/opt/openssl/include"
136-
export PATH="/usr/local/opt/openssl/bin:$PATH"
137-
fi
122+
export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
123+
export CFLAGS="-I/usr/local/opt/[email protected]/include"
124+
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
138125
fi
139126
openssl version
140127
~/.venv/bin/tox -v

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Backward-incompatible changes:
1212
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1313

1414
- Drop support for Python 3.4
15+
- Drop support for OpenSSL 1.0.1
1516

1617
Deprecations:
1718
^^^^^^^^^^^^^

INSTALL.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ Supported OpenSSL Versions
2525
pyOpenSSL supports the same platforms and releases as the upstream cryptography project `does <https://cryptography.io/en/latest/installation/#supported-platforms>`_.
2626
Currently that means:
2727

28-
- 1.0.1
2928
- 1.0.2
3029
- 1.1.0
3130
- 1.1.1

src/OpenSSL/SSL.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -727,14 +727,11 @@ def __init__(self, method):
727727
_openssl_assert(context != _ffi.NULL)
728728
context = _ffi.gc(context, _lib.SSL_CTX_free)
729729

730-
# If SSL_CTX_set_ecdh_auto is available then set it so the ECDH curve
731-
# will be auto-selected. This function was added in 1.0.2 and made a
732-
# noop in 1.1.0+ (where it is set automatically).
733-
try:
734-
res = _lib.SSL_CTX_set_ecdh_auto(context, 1)
735-
_openssl_assert(res == 1)
736-
except AttributeError:
737-
pass
730+
# Set SSL_CTX_set_ecdh_auto so that the ECDH curve will be
731+
# auto-selected. This function was added in 1.0.2 and made a noop in
732+
# 1.1.0+ (where it is set automatically).
733+
res = _lib.SSL_CTX_set_ecdh_auto(context, 1)
734+
_openssl_assert(res == 1)
738735

739736
self._context = context
740737
self._passphrase_helper = None
@@ -2309,8 +2306,7 @@ def set_session(self, session):
23092306
raise TypeError("session must be a Session instance")
23102307

23112308
result = _lib.SSL_set_session(self._ssl, session._session)
2312-
if not result:
2313-
_raise_current_error()
2309+
_openssl_assert(result == 1)
23142310

23152311
def _get_finished_message(self, function):
23162312
"""

0 commit comments

Comments
 (0)