-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms'. AWS sam build failure. #7959
Comments
This occurs with an outdated pyOpenSSL version. Edit: For anyone else who finds this. |
Hi I'm having the same issue with |
Are you sure you're actually using cryptography 39.0.0 and pyopenssl 23.0.0? The code to trigger this simply doesn't exist in pyopenssl, so I doubt that's what's happening. Perhaps try re-creating your virtualenv from scratch. |
@alex yep my mistake! turns out I was just looking in the wrong place. thanks! |
old version pyOpenssl using "cryptography>=35.0" ,but "cryptography==39.0.0" let openssl broken, and then pip broken too. |
cryptography is not a cornerstone of pip, but old versions of pip vendored an older version of urllib3 which automatically used pyopenssl if present in an environment. Upgrading pip or pyopenssl (or removing pyopenssl!) will fix that situation. |
For aws-sam-cli users they have fixed their bug in |
Hi @reaperhulk |
fix: for the build issue "AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms' "cryptography 39.0.0 no longer supports openssl 1.1.0 or older and thus is causing this issue. Reference: pyca/cryptography#7959 https://cryptography.io/en/latest/changelog/#v39-0-0 As a workaround until the dependencies are fixed, you can force install cryptography 38.0.4 and sam should work (I just verified with my CI/CD builds which all got broken today due to the cryptography update).
To update cryptography from 38.0.4 to 39.0.2. From pyca/cryptography#7959 (comment) > pyOpenSSL declares a min/max cryptography version to > avoid incompatibilities like this, however it only > started doing this in pyOpenSSL 22.1.0 and above.
* Update dependency cryptography to v39 * Bump pyOpenSSL to version 23.0.0+ To update cryptography from 38.0.4 to 39.0.2. From pyca/cryptography#7959 (comment) > pyOpenSSL declares a min/max cryptography version to > avoid incompatibilities like this, however it only > started doing this in pyOpenSSL 22.1.0 and above. --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alex Lutay <1928266+taurus-forever@users.noreply.github.com> Co-authored-by: Paulo Machado <paulo.machado@canonical.com>
I'm getting below error after installing latest version of cryptography by using requirements.txt file in AWS deployment.
versions used during installation-
cryptography-39.0.0
Python- 3.9
cffi--1.15.1
pip-22.3.1
setuptools-58.1.0
Could you please help me in resolving this issue?
The text was updated successfully, but these errors were encountered: