[Twisted-Python] RunningTwisted tests on Windows and SSL

John Aherne johnaherne at rocs.co.uk
Sun Mar 18 07:45:54 MDT 2018


This is useful info for anyone else running into these issues. At least
they might save a bit of time not having to run down what is happening.


Seems that the mail,email, test_hook and StringIO errors all come from not
ported modules as seen in twisted\src\python\_setup.py.

The _getEllipticCurve error

<< builtins.AttributeError: type object 'OpenSSLCertificateOptions' has no
attribute '_getEllipticCurve'

twisted.test.test_sslverify.OpenSSLOptionsTests.test_ecDoesNotBreakConstructor
>>

is because getattr will raise an AttributeError, which is what it is doing
here. But it does not do this for python2.7.

The test is not to break if the ECCurve is missing. It is missing since it
is not found. Still looking at this.

With wincertstore being used, we get a failing test as follows:

[FAIL]
Traceback (most recent call last):
  File "c:\twistedssl\twisted\src\twisted\web\test\test_agent.py", line
1568, in test_setsTrustRootOnContextToDefaultTrustRoot
    certificateOptions.trustRoot, ssl.OpenSSLDefaultPaths)
  File "c:\twistedssl\twisted\src\twisted\trial\_synctest.py", line 649, in
assertIsInstance
    instance, classOrTuple, suffix))
twisted.trial.unittest.FailTest:
<twisted.internet._sslverify.OpenSSLWindowsCertificateAuthorities object at
0x0CFDA810> is not an instance of <class
'twisted.internet._sslverify.OpenSSLDefaultPaths'>

twisted.web.test.test_agent.WebClientContextFactoryTests.test_setsTrustRootOnContextToDefaultTrustRoot

So a new test is needed to fix this.

Also, the current patch only loads the ROOT certificates. The standard
library loads ['CA', 'ROOT'], so we should be doing the same I imagine.



-- 
*John Aherne*




*www.rocs.co.uk <http://www.rocs.co.uk>*
020 7223 7567
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20180318/c3b57f42/attachment-0002.html>


More information about the Twisted-Python mailing list