Bug 268290 - net-im/py-matrix-synapse: AttributeError: module 'OpenSSL.SSL' has no attribute 'TLS_METHOD'
Summary: net-im/py-matrix-synapse: AttributeError: module 'OpenSSL.SSL' has no attribu...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on: 268043
Blocks:
  Show dependency treegraph
 
Reported: 2022-12-10 10:16 UTC by co+org.freebsd
Modified: 2023-12-29 17:19 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (ports)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description co+org.freebsd 2022-12-10 10:16:13 UTC
Hello!

After upgrading from 1.71 to 1.72 today, the server fails to start with the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 188, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/local/lib/python3.9/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/usr/local/lib/python3.9/site-packages/synapse/__init__.py", line 23, in <module>
    from synapse.util.rust import check_rust_lib_up_to_date
  File "/usr/local/lib/python3.9/site-packages/synapse/util/__init__.py", line 31, in <module>
    from synapse.logging import context
  File "/usr/local/lib/python3.9/site-packages/synapse/logging/__init__.py", line 17, in <module>
    from synapse.logging._remote import RemoteHandler
  File "/usr/local/lib/python3.9/site-packages/synapse/logging/_remote.py", line 29, in <module>
    from twisted.internet.endpoints import (
  File "/usr/local/lib/python3.9/site-packages/twisted/internet/endpoints.py", line 69, in <module>
    from twisted.internet.ssl import (
  File "/usr/local/lib/python3.9/site-packages/twisted/internet/ssl.py", line 63, in <module>
    from twisted.internet import interfaces, tcp
  File "/usr/local/lib/python3.9/site-packages/twisted/internet/tcp.py", line 38, in <module>
    from twisted.internet._newtls import (
  File "/usr/local/lib/python3.9/site-packages/twisted/internet/_newtls.py", line 18, in <module>
    from twisted.protocols.tls import TLSMemoryBIOFactory, TLSMemoryBIOProtocol
  File "/usr/local/lib/python3.9/site-packages/twisted/protocols/tls.py", line 45, in <module>
    from twisted.internet._sslverify import _setAcceptableProtocols
  File "/usr/local/lib/python3.9/site-packages/twisted/internet/_sslverify.py", line 1828, in <module>
    defaultCiphers = OpenSSLAcceptableCiphers.fromOpenSSLCipherString(
  File "/usr/local/lib/python3.9/site-packages/twisted/internet/_sslverify.py", line 1807, in fromOpenSSLCipherString
    SSL.TLS_METHOD,
AttributeError: module 'OpenSSL.SSL' has no attribute 'TLS_METHOD'
Comment 1 Herbert J. Skuhra 2022-12-10 10:47:51 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268043 ?
Comment 2 co+org.freebsd 2022-12-10 11:02:32 UTC
Ah, thank you! The workaround in that ticket does seem to get the server up and running again.
Comment 3 Li-Wen Hsu freebsd_committer freebsd_triage 2023-04-27 18:29:28 UTC
Can you help to check if 1.82.0 still has this issue?
Comment 4 Herbert J. Skuhra 2023-04-29 07:38:43 UTC
(In reply to Li-Wen Hsu from comment #3)

I guess the problematic port is devel/py-twisted (see bug #268043).
The workaround is still in place because security/py-openssl and secury/py-cryptography haven't been upgraded yet. :-(

security/py-openssl 20.0.1 (Dec 15, 2020)
latest version is 23.1.1 (released Mar 28,2023)

security/py-cryptography 3.4.8 (released Aug 24, 2021)
latest version is 40.0.2 (released two weeks ago)
Comment 5 hagen.bauer@caserio.de 2023-04-30 15:21:38 UTC
yes 1.82 still has this bug