Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not use RTLD_DEEPBIND if PYCRYPTODOME_DISABLE_DEEPBIND is set to empty string #807

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ New features
* Added cSHAKE128 and cSHAKE256 (of SHA-3 family). Thanks to Michael Schaffner.
* GH#558: The flag RTLD_DEEPBIND passed to ``dlopen()`` is not well supported by
`address sanitizers <https://github.com/google/sanitizers/issues/611>`_.
It is now possible to set the environment variable ``PYCRYPTDOME_DISABLE_DEEPBIND``
It is now possible to set the environment variable ``PYCRYPTODOME_DISABLE_DEEPBIND``
to drop that flag and allow security testing.

3.10.4 (25 September 2021)
Expand Down
2 changes: 1 addition & 1 deletion lib/Crypto/Util/_raw_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def load_lib(name, cdecl):
@cdecl, the C function declarations.
"""

if hasattr(ffi, "RTLD_DEEPBIND") and not os.getenv('PYCRYPTODOME_DISABLE_DEEPBIND'):
if hasattr(ffi, "RTLD_DEEPBIND") and os.getenv('PYCRYPTODOME_DISABLE_DEEPBIND') is None:
lib = ffi.dlopen(name, ffi.RTLD_DEEPBIND)
else:
lib = ffi.dlopen(name)
Expand Down
Loading