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

New OpenSSL breaks Cardinal #200

Closed
vwbusguy opened this issue Jan 9, 2023 · 0 comments · Fixed by #202
Closed

New OpenSSL breaks Cardinal #200

vwbusguy opened this issue Jan 9, 2023 · 0 comments · Fixed by #202
Labels

Comments

@vwbusguy
Copy link
Contributor

vwbusguy commented Jan 9, 2023

OpenSSL 3.9 has a breaking change that affects Cardinal for newly built container images:

   File "/usr/src/app/./cardinal.py", line 9, in <module>
     from twisted.internet import reactor
   File "/usr/local/lib/python3.11/site-packages/twisted/internet/reactor.py", line 38, in <module>
     from twisted.internet import default
   File "/usr/local/lib/python3.11/site-packages/twisted/internet/default.py", line 55, in <module>
     install = _getInstallFunction(platform)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/local/lib/python3.11/site-packages/twisted/internet/default.py", line 43, in _getInstallFunction
     from twisted.internet.epollreactor import install
   File "/usr/local/lib/python3.11/site-packages/twisted/internet/epollreactor.py", line 19, in <module>
     from twisted.internet import posixbase
   File "/usr/local/lib/python3.11/site-packages/twisted/internet/posixbase.py", line 16, in <module>
     from twisted.internet import error, tcp, udp
   File "/usr/local/lib/python3.11/site-packages/twisted/internet/tcp.py", line 38, in <module>
     from twisted.internet._newtls import (
   File "/usr/local/lib/python3.11/site-packages/twisted/internet/_newtls.py", line 18, in <module>
     from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
   File "/usr/local/lib/python3.11/site-packages/twisted/protocols/tls.py", line 42, in <module>
     from OpenSSL.SSL import Connection, Error, SysCallError, WantReadError, ZeroReturnError
   File "/usr/local/lib/python3.11/site-packages/OpenSSL/__init__.py", line 8, in <module>
     from OpenSSL import crypto, SSL
   File "/usr/local/lib/python3.11/site-packages/OpenSSL/crypto.py", line 3268, in <module>
     _lib.OpenSSL_add_all_algorithms()
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 module lib has no attribute OpenSSL_add_all_algorithms

The workaround seems to be adding "cryptography==38.0.4" to requirements.txt. I've just tested it out locally and will submit a PR for it shortly.

johnmaguire added a commit that referenced this issue Jan 9, 2023
Remove the dependency on `mock` in lieu of `unittest.mock`.
Updating pyOpenSSL to 23.0.0 fixes #200.
johnmaguire added a commit that referenced this issue Jan 9, 2023
Remove the dependency on `mock` in lieu of `unittest.mock`.
Updating pyOpenSSL to 23.0.0 fixes #200.
@johnmaguire johnmaguire added the bug label Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants