m2crypto 0.33.0 FTBFS on Fedora Rawhide (F31) - tests.test_rsa.RSATestCase fails
When trying to build m2crypto 0.33.0 on Fedora Rawhide, I get the following error from the test suite:
BUILDSTDERR: ======================================================================
BUILDSTDERR: ERROR: test_rsa_exceptions (tests.test_rsa.RSATestCase)
BUILDSTDERR: ----------------------------------------------------------------------
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR: File "/builddir/build/BUILD/M2Crypto-0.33.0/tests/test_rsa.py", line 49, in test_rsa_exceptions
BUILDSTDERR: RSA.rsa_error()
BUILDSTDERR: File "/builddir/build/BUILD/M2Crypto-0.33.0/M2Crypto/RSA.py", line 330, in rsa_error
BUILDSTDERR: raise RSAError(Err.get_error_message())
BUILDSTDERR: File "/builddir/build/BUILD/M2Crypto-0.33.0/M2Crypto/Err.py", line 48, in get_error_message
BUILDSTDERR: return six.ensure_text(get_error_reason(get_error_code()))
BUILDSTDERR: File "/builddir/build/BUILD/M2Crypto-0.33.0/M2Crypto/Err.py", line 43, in get_error_reason
BUILDSTDERR: return six.ensure_text(m2.err_reason_error_string(err))
BUILDSTDERR: File "/builddir/build/BUILD/M2Crypto-0.33.0/M2Crypto/six.py", line 906, in ensure_text
BUILDSTDERR: raise TypeError("not expecting type '%s'" % type(s))
BUILDSTDERR: TypeError: not expecting type '<type 'NoneType'>'
BUILDSTDERR: ======================================================================
BUILDSTDERR: FAIL: test_public_encrypt (tests.test_rsa.RSATestCase)
BUILDSTDERR: ----------------------------------------------------------------------
BUILDSTDERR: Traceback (most recent call last):
BUILDSTDERR: File "/builddir/build/BUILD/M2Crypto-0.33.0/tests/test_rsa.py", line 128, in test_public_encrypt
BUILDSTDERR: priv.private_decrypt(ctxt, RSA.sslv23_padding)
BUILDSTDERR: AssertionError: RSAError not raised
BUILDSTDERR: ----------------------------------------------------------------------
BUILDSTDERR: Ran 296 tests in 83.373s
BUILDSTDERR: FAILED (failures=1, errors=1, skipped=1)
BUILDSTDERR: Test failed: <unittest.runner.TextTestResult run=296 errors=1 failures=1>
BUILDSTDERR: error: Test failed: <unittest.runner.TextTestResult run=296 errors=1 failures=1>
Link to failed Koji scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=35136689
This issue is also reported downstream as RH#1715243.
My current theory is that it has to do with OpenSSL. Rawhide is currently at OpenSSL 1.1.1c. Fedora 30, which has OpenSSL 1.1.1b, seems to work fine.