Opened 4 years ago

Last modified 4 years ago

#9354 enhancement new

Twisted requires pyOpenSSL>=16.2.0

Reported by: mark williams Owned by:
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:
Author:

Description

Twisted claims to require pyOpenSSL>=16.0.0, but he tests fail with the following traceback on pyOpenSSL 16.0.0 and 16.1.0:

$ trial twisted.test.test_sslverify
Unhandled Error
Traceback (most recent call last):
  File "/testenv/lib/python2.7/site-packages/twisted/scripts/trial.py", line 478, in postOptions
    _BasicOptions.postOptions(self)
  File "/testenv/lib/python2.7/site-packages/twisted/scripts/trial.py", line 388, in postOptions
    self['reporter'] = self._loadReporterByName(self['reporter'])
  File "/testenv/lib/python2.7/site-packages/twisted/scripts/trial.py", line 375, in _loadReporterByName
    for p in plugin.getPlugins(itrial.IReporter):
  File "/testenv/lib/python2.7/site-packages/twisted/plugin.py", line 213, in getPlugins
    allDropins = getCache(package)
--- <exception caught here> ---
  File "/testenv/lib/python2.7/site-packages/twisted/plugin.py", line 171, in getCache
    provider = pluginModule.load()
  File "/testenv/lib/python2.7/site-packages/twisted/python/modules.py", line 392, in load
    return self.pathEntry.pythonPath.moduleLoader(self.name)
  File "/testenv/lib/python2.7/site-packages/twisted/python/reflect.py", line 308, in namedAny
    topLevelPackage = _importAndCheckStack(trialname)
  File "/testenv/lib/python2.7/site-packages/twisted/python/reflect.py", line 247, in _importAndCheckStack
    return __import__(importName)
  File "/testenv/lib/python2.7/site-packages/twisted/plugins/twisted_core.py", line 6, in <module>
    from twisted.internet.endpoints import (
  File "/testenv/lib/python2.7/site-packages/twisted/internet/endpoints.py", line 58, in <module>
    from twisted.protocols.tls import TLSMemoryBIOFactory
  File "/testenv/lib/python2.7/site-packages/twisted/protocols/tls.py", line 41, in <module>
    from OpenSSL.SSL import Error, ZeroReturnError, WantReadError
  File "/testenv/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "/testenv/lib/python2.7/site-packages/OpenSSL/SSL.py", line 124, in <module>
    SSL_ST_INIT = _lib.SSL_ST_INIT
exceptions.AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

Change History (1)

comment:1 Changed 4 years ago by Jean-Paul Calderone

Does import OpenSSL even work on the system where you tested that 16.0 and 16.1 compatibility? It looks more like a pyOpenSSL/OpenSSL incompatibility than a Twisted/pyOpenSSL incompatibility to me. pyOpenSSL is trying to get a symbol from the OpenSSL cffi interface and it is missing.

Note: See TracTickets for help on using tickets.