Skip to content

Commit d184fbb

Browse files
authored
Update variable name, there are now many linuxes (pyca#1070)
1 parent 8b85cfd commit d184fbb

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/OpenSSL/SSL.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@
259259

260260
# These values are compared to output from cffi's ffi.string so they must be
261261
# byte strings.
262-
_CRYPTOGRAPHY_MANYLINUX1_CA_DIR = b"/opt/pyca/cryptography/openssl/certs"
263-
_CRYPTOGRAPHY_MANYLINUX1_CA_FILE = b"/opt/pyca/cryptography/openssl/cert.pem"
262+
_CRYPTOGRAPHY_MANYLINUX_CA_DIR = b"/opt/pyca/cryptography/openssl/certs"
263+
_CRYPTOGRAPHY_MANYLINUX_CA_FILE = b"/opt/pyca/cryptography/openssl/cert.pem"
264264

265265

266266
class Error(Exception):
@@ -872,8 +872,8 @@ def set_default_verify_paths(self):
872872
# to the exact values we use in our manylinux1 builds. If they are
873873
# then we know to load the fallbacks
874874
if (
875-
default_dir == _CRYPTOGRAPHY_MANYLINUX1_CA_DIR
876-
and default_file == _CRYPTOGRAPHY_MANYLINUX1_CA_FILE
875+
default_dir == _CRYPTOGRAPHY_MANYLINUX_CA_DIR
876+
and default_file == _CRYPTOGRAPHY_MANYLINUX_CA_FILE
877877
):
878878
# This is manylinux1, let's load our fallback paths
879879
self._fallback_default_verify_paths(

tests/test_ssl.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1214,8 +1214,8 @@ def test_load_verify_locations_wrong_args(self):
12141214
def test_fallback_default_verify_paths(self, monkeypatch):
12151215
"""
12161216
Test that we load certificates successfully on linux from the fallback
1217-
path. To do this we set the _CRYPTOGRAPHY_MANYLINUX1_CA_FILE and
1218-
_CRYPTOGRAPHY_MANYLINUX1_CA_DIR vars to be equal to whatever the
1217+
path. To do this we set the _CRYPTOGRAPHY_MANYLINUX_CA_FILE and
1218+
_CRYPTOGRAPHY_MANYLINUX_CA_DIR vars to be equal to whatever the
12191219
current OpenSSL default is and we disable
12201220
SSL_CTX_SET_default_verify_paths so that it can't find certs unless
12211221
it loads via fallback.
@@ -1226,12 +1226,12 @@ def test_fallback_default_verify_paths(self, monkeypatch):
12261226
)
12271227
monkeypatch.setattr(
12281228
SSL,
1229-
"_CRYPTOGRAPHY_MANYLINUX1_CA_FILE",
1229+
"_CRYPTOGRAPHY_MANYLINUX_CA_FILE",
12301230
_ffi.string(_lib.X509_get_default_cert_file()),
12311231
)
12321232
monkeypatch.setattr(
12331233
SSL,
1234-
"_CRYPTOGRAPHY_MANYLINUX1_CA_DIR",
1234+
"_CRYPTOGRAPHY_MANYLINUX_CA_DIR",
12351235
_ffi.string(_lib.X509_get_default_cert_dir()),
12361236
)
12371237
context.set_default_verify_paths()

0 commit comments

Comments
 (0)