From a92a1a708f3973d0640a6f7c9e43adf1e6925f82 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Wed, 19 Jul 2017 15:53:23 +0200 Subject: fix #664 (#665) * fix #664 bytes and strings are different things. * update changelog * let's just make the sentinel values byte strings * flake8 --- CHANGELOG.rst | 4 ++++ src/OpenSSL/SSL.py | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f42f4d9..9d435e9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -25,6 +25,10 @@ Deprecations: Changes: ^^^^^^^^ +- Fixed a bug causing ``Context.set_default_verify_paths()`` to not work with + cryptography ``manylinux1`` wheels on Python 3.x. + `#665 `_ + *none* diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py index 9ac9651..8d94bd8 100644 --- a/src/OpenSSL/SSL.py +++ b/src/OpenSSL/SSL.py @@ -145,8 +145,10 @@ _CERTIFICATE_PATH_LOCATIONS = [ "/etc/ssl/certs", # SLES10/SLES11 ] -_CRYPTOGRAPHY_MANYLINUX1_CA_DIR = "/opt/pyca/cryptography/openssl/certs" -_CRYPTOGRAPHY_MANYLINUX1_CA_FILE = "/opt/pyca/cryptography/openssl/cert.pem" +# These values are compared to output from cffi's ffi.string so they must be +# byte strings. +_CRYPTOGRAPHY_MANYLINUX1_CA_DIR = b"/opt/pyca/cryptography/openssl/certs" +_CRYPTOGRAPHY_MANYLINUX1_CA_FILE = b"/opt/pyca/cryptography/openssl/cert.pem" class Error(Exception): -- cgit v1.2.1