Skip to content

Commit

Permalink
Update comments for manylinux (#1232)
Browse files Browse the repository at this point in the history
  • Loading branch information
alex authored Jul 7, 2023
1 parent 0abf9ec commit 19b3827
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/OpenSSL/SSL.py
Original file line number Diff line number Diff line change
Expand Up @@ -955,9 +955,9 @@ def set_default_verify_paths(self):
the ``[email protected]`` `Homebrew <https://brew.sh>`_ formula installed
in the default location.
* Windows will not work.
* manylinux1 cryptography wheels will work on most common Linux
* manylinux cryptography wheels will work on most common Linux
distributions in pyOpenSSL 17.1.0 and above. pyOpenSSL detects the
manylinux1 wheel and attempts to load roots via a fallback path.
manylinux wheel and attempts to load roots via a fallback path.
:return: None
"""
Expand All @@ -982,13 +982,13 @@ def set_default_verify_paths(self):
default_dir = _ffi.string(_lib.X509_get_default_cert_dir())
default_file = _ffi.string(_lib.X509_get_default_cert_file())
# Now we check to see if the default_dir and default_file are set
# to the exact values we use in our manylinux1 builds. If they are
# to the exact values we use in our manylinux builds. If they are
# then we know to load the fallbacks
if (
default_dir == _CRYPTOGRAPHY_MANYLINUX_CA_DIR
and default_file == _CRYPTOGRAPHY_MANYLINUX_CA_FILE
):
# This is manylinux1, let's load our fallback paths
# This is manylinux, let's load our fallback paths
self._fallback_default_verify_paths(
_CERTIFICATE_FILE_LOCATIONS, _CERTIFICATE_PATH_LOCATIONS
)
Expand All @@ -1007,7 +1007,7 @@ def _check_env_vars_set(self, dir_env_var, file_env_var):
def _fallback_default_verify_paths(self, file_path, dir_path):
"""
Default verify paths are based on the compiled version of OpenSSL.
However, when pyca/cryptography is compiled as a manylinux1 wheel
However, when pyca/cryptography is compiled as a manylinux wheel
that compiled location can potentially be wrong. So, like Go, we
will try a predefined set of paths and attempt to load roots
from there.
Expand Down
2 changes: 1 addition & 1 deletion tests/test_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@ def test_load_verify_locations_wrong_args(self):
@pytest.mark.skipif(
not platform.startswith("linux"),
reason="Loading fallback paths is a linux-specific behavior to "
"accommodate pyca/cryptography manylinux1 wheels",
"accommodate pyca/cryptography manylinux wheels",
)
def test_fallback_default_verify_paths(self, monkeypatch):
"""
Expand Down

0 comments on commit 19b3827

Please sign in to comment.