Source: m2crypto
Version: 0.36.0-1
Severity: important
User: [email protected]
Usertags: pytest-v6
Hi,
m2crypto FTBFS with pytest 6 in experimental.
The error log below has more details.
> I: pybuild base:232: cd
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_m2crypto/build; python3.9 -m pytest
> tests
> ============================= test session starts
> ==============================
> platform linux -- Python 3.9.1, pytest-6.0.2, py-1.9.0, pluggy-0.13.0
> rootdir: /<<PKGBUILDDIR>>
> collected 302 items
>
> tests/test_aes.py .... [
> 1%]
> tests/test_asn1.py ........ [
> 3%]
> tests/test_authcookie.py ................... [
> 10%]
> tests/test_bio.py . [
> 10%]
> tests/test_bio_file.py ....... [
> 12%]
> tests/test_bio_iobuf.py ........ [
> 15%]
> tests/test_bio_membuf.py .......... [
> 18%]
> tests/test_bio_ssl.py ....... [
> 21%]
> tests/test_bn.py ... [
> 22%]
> tests/test_dh.py ...... [
> 24%]
> tests/test_dsa.py ........... [
> 27%]
> tests/test_ec_curves.py .. [
> 28%]
> tests/test_ecdh.py ... [
> 29%]
> tests/test_ecdsa.py ....... [
> 31%]
> tests/test_engine.py ...... [
> 33%]
> tests/test_err.py . [
> 34%]
> tests/test_evp.py ........................ [
> 42%]
> tests/test_obj.py ...... [
> 44%]
> tests/test_rand.py ...... [
> 46%]
> tests/test_rc4.py .. [
> 46%]
> tests/test_rsa.py .......................... [
> 55%]
> tests/test_smime.py ..................... [
> 62%]
> tests/test_ssl.py ...s.........................FFF.F.......s............ [
> 80%]
> ... [
> 81%]
> tests/test_ssl_offline.py ..... [
> 82%]
> tests/test_threading.py .. [
> 83%]
> tests/test_timeout.py ............... [
> 88%]
> tests/test_util.py ........ [
> 91%]
> tests/test_x509.py ...........................
> [100%]
>
> =================================== FAILURES
> ===================================
> ___________________ MiscSSLClientTestCase.test_verify_cb_new
> ___________________
>
> self = <tests.test_ssl.MiscSSLClientTestCase testMethod=test_verify_cb_new>
>
> def test_verify_cb_new(self):
> pid = self.start_server(self.args)
> try:
> ctx = SSL.Context()
> ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert,
> 9, self.verify_cb_new)
> s = SSL.Connection(ctx)
> try:
>> s.connect(self.srv_addr)
>
> tests/test_ssl.py:521:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <M2Crypto.SSL.Connection.Connection object at 0x7f5c43c388e0>
> addr = ('localhost', 43785)
>
> def connect(self, addr):
> # type: (util.AddrType) -> int
> """Overloading socket.connect()
>
> :param addr: addresses have various depending on their type
>
> :return:status of ssl_connect()
> """
> self.socket.connect(addr)
> self.addr = addr
> self.setup_ssl()
> self.set_connect_state()
>> ret = self.connect_ssl()
>
> M2Crypto/SSL/Connection.py:327:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <M2Crypto.SSL.Connection.Connection object at 0x7f5c43c388e0>
>
> def connect_ssl(self):
> # type: () -> Optional[int]
>> return m2.ssl_connect(self.ssl, self._timeout)
> E M2Crypto.SSL.SSLError: certificate verify failed
>
> M2Crypto/SSL/Connection.py:313: SSLError
>
> During handling of the above exception, another exception occurred:
>
> self = <tests.test_ssl.MiscSSLClientTestCase testMethod=test_verify_cb_new>
>
> def test_verify_cb_new(self):
> pid = self.start_server(self.args)
> try:
> ctx = SSL.Context()
> ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert,
> 9, self.verify_cb_new)
> s = SSL.Connection(ctx)
> try:
> s.connect(self.srv_addr)
> except SSL.SSLError as e:
>> self.fail(e)
> E AssertionError: certificate verify failed
>
> tests/test_ssl.py:523: AssertionError
> ________________ MiscSSLClientTestCase.test_verify_cb_new_class
> ________________
>
> self = <tests.test_ssl.MiscSSLClientTestCase
> testMethod=test_verify_cb_new_class>
>
> def test_verify_cb_new_class(self):
> pid = self.start_server(self.args)
> try:
> ctx = SSL.Context()
> ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert,
> 9, VerifyCB())
> s = SSL.Connection(ctx)
> try:
>> s.connect(self.srv_addr)
>
> tests/test_ssl.py:538:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <M2Crypto.SSL.Connection.Connection object at 0x7f5c433477c0>
> addr = ('localhost', 35013)
>
> def connect(self, addr):
> # type: (util.AddrType) -> int
> """Overloading socket.connect()
>
> :param addr: addresses have various depending on their type
>
> :return:status of ssl_connect()
> """
> self.socket.connect(addr)
> self.addr = addr
> self.setup_ssl()
> self.set_connect_state()
>> ret = self.connect_ssl()
>
> M2Crypto/SSL/Connection.py:327:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <M2Crypto.SSL.Connection.Connection object at 0x7f5c433477c0>
>
> def connect_ssl(self):
> # type: () -> Optional[int]
>> return m2.ssl_connect(self.ssl, self._timeout)
> E M2Crypto.SSL.SSLError: certificate verify failed
>
> M2Crypto/SSL/Connection.py:313: SSLError
>
> During handling of the above exception, another exception occurred:
>
> self = <tests.test_ssl.MiscSSLClientTestCase
> testMethod=test_verify_cb_new_class>
>
> def test_verify_cb_new_class(self):
> pid = self.start_server(self.args)
> try:
> ctx = SSL.Context()
> ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert,
> 9, VerifyCB())
> s = SSL.Connection(ctx)
> try:
> s.connect(self.srv_addr)
> except SSL.SSLError as e:
> log.exception(e)
>> self.fail(e)
> E AssertionError: certificate verify failed
>
> tests/test_ssl.py:541: AssertionError
> ------------------------------ Captured log call
> -------------------------------
> ERROR test_SSL:test_ssl.py:540 certificate verify failed
> Traceback (most recent call last):
> File
> "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_m2crypto/build/tests/test_ssl.py",
> line 538, in test_verify_cb_new_class
> s.connect(self.srv_addr)
> File
> "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_m2crypto/build/M2Crypto/SSL/Connection.py",
> line 327, in connect
> ret = self.connect_ssl()
> File
> "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_m2crypto/build/M2Crypto/SSL/Connection.py",
> line 313, in connect_ssl
> return m2.ssl_connect(self.ssl, self._timeout)
> M2Crypto.SSL.SSLError: certificate verify failed
> ______________ MiscSSLClientTestCase.test_verify_cb_new_function
> _______________
>
> self = <tests.test_ssl.MiscSSLClientTestCase
> testMethod=test_verify_cb_new_function>
>
> def test_verify_cb_new_function(self):
> pid = self.start_server(self.args)
> try:
> ctx = SSL.Context()
> ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert,
> 9, verify_cb_new_function)
> s = SSL.Connection(ctx)
> try:
>> s.connect(self.srv_addr)
>
> tests/test_ssl.py:556:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <M2Crypto.SSL.Connection.Connection object at 0x7f5c43130d30>
> addr = ('localhost', 46641)
>
> def connect(self, addr):
> # type: (util.AddrType) -> int
> """Overloading socket.connect()
>
> :param addr: addresses have various depending on their type
>
> :return:status of ssl_connect()
> """
> self.socket.connect(addr)
> self.addr = addr
> self.setup_ssl()
> self.set_connect_state()
>> ret = self.connect_ssl()
>
> M2Crypto/SSL/Connection.py:327:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <M2Crypto.SSL.Connection.Connection object at 0x7f5c43130d30>
>
> def connect_ssl(self):
> # type: () -> Optional[int]
>> return m2.ssl_connect(self.ssl, self._timeout)
> E M2Crypto.SSL.SSLError: certificate verify failed
>
> M2Crypto/SSL/Connection.py:313: SSLError
>
> During handling of the above exception, another exception occurred:
>
> self = <tests.test_ssl.MiscSSLClientTestCase
> testMethod=test_verify_cb_new_function>
>
> def test_verify_cb_new_function(self):
> pid = self.start_server(self.args)
> try:
> ctx = SSL.Context()
> ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert,
> 9, verify_cb_new_function)
> s = SSL.Connection(ctx)
> try:
> s.connect(self.srv_addr)
> except SSL.SSLError as e:
>> self.fail(e)
> E AssertionError: certificate verify failed
>
> tests/test_ssl.py:558: AssertionError
> ___________________ MiscSSLClientTestCase.test_verify_cb_old
> ___________________
>
> self = <tests.test_ssl.MiscSSLClientTestCase testMethod=test_verify_cb_old>
>
> def test_verify_cb_old(self):
> with warnings.catch_warnings():
> warnings.simplefilter("ignore", DeprecationWarning)
> pid = self.start_server(self.args)
> try:
> ctx = SSL.Context()
> ctx.set_verify(
> SSL.verify_peer | SSL.verify_fail_if_no_peer_cert,
> 9, self.verify_cb_old)
> s = SSL.Connection(ctx)
> try:
>> s.connect(self.srv_addr)
>
> tests/test_ssl.py:646:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <M2Crypto.SSL.Connection.Connection object at 0x7f5c43347880>
> addr = ('localhost', 46533)
>
> def connect(self, addr):
> # type: (util.AddrType) -> int
> """Overloading socket.connect()
>
> :param addr: addresses have various depending on their type
>
> :return:status of ssl_connect()
> """
> self.socket.connect(addr)
> self.addr = addr
> self.setup_ssl()
> self.set_connect_state()
>> ret = self.connect_ssl()
>
> M2Crypto/SSL/Connection.py:327:
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
>
> self = <M2Crypto.SSL.Connection.Connection object at 0x7f5c43347880>
>
> def connect_ssl(self):
> # type: () -> Optional[int]
>> return m2.ssl_connect(self.ssl, self._timeout)
> E M2Crypto.SSL.SSLError: certificate verify failed
>
> M2Crypto/SSL/Connection.py:313: SSLError
>
> During handling of the above exception, another exception occurred:
>
> self = <tests.test_ssl.MiscSSLClientTestCase testMethod=test_verify_cb_old>
>
> def test_verify_cb_old(self):
> with warnings.catch_warnings():
> warnings.simplefilter("ignore", DeprecationWarning)
> pid = self.start_server(self.args)
> try:
> ctx = SSL.Context()
> ctx.set_verify(
> SSL.verify_peer | SSL.verify_fail_if_no_peer_cert,
> 9, self.verify_cb_old)
> s = SSL.Connection(ctx)
> try:
> s.connect(self.srv_addr)
> except SSL.SSLError as e:
>> self.fail(e)
> E AssertionError: certificate verify failed
>
> tests/test_ssl.py:648: AssertionError
> =============================== warnings summary
> ===============================
> M2Crypto/m2crypto.py:13
>
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_m2crypto/build/M2Crypto/m2crypto.py:13:
> DeprecationWarning: the imp module is deprecated in favour of importlib; see
> the module's documentation for alternative uses
> import imp
>
> M2Crypto/SSL/Checker.py:67
>
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_m2crypto/build/M2Crypto/SSL/Checker.py:67:
> DeprecationWarning: invalid escape sequence \.
> numericIpMatch = re.compile('^[0-9]+(\.[0-9]+)*$')
>
> M2Crypto/SSL/Checker.py:257
>
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_m2crypto/build/M2Crypto/SSL/Checker.py:257:
> DeprecationWarning: invalid escape sequence \.
> certHost = certHost.replace('.', '\.')
>
> M2Crypto/SSL/Checker.py:258
>
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_m2crypto/build/M2Crypto/SSL/Checker.py:258:
> DeprecationWarning: invalid escape sequence \.
> certHost = certHost.replace('*', '[^\.]*')
>
> .pybuild/cpython3_3.9_m2crypto/build/tests/test_obj.py::ObjectsTestCase::test_detailed_error_message
>
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_m2crypto/build/tests/test_obj.py:127:
> DeprecationWarning: Please use assertRegex instead.
> self.assertRegexpMatches(str(e),
>
> .pybuild/cpython3_3.9_m2crypto/build/tests/test_ssl.py::TwistedSSLClientTestCase::test_twisted_wrapper
>
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_m2crypto/build/tests/test_ssl.py:1139:
> UserWarning: Skipping twisted wrapper test because twisted not found
> warnings.warn(
>
> -- Docs: https://docs.pytest.org/en/stable/warnings.html
> =========================== short test summary info
> ============================
> FAILED tests/test_ssl.py::MiscSSLClientTestCase::test_verify_cb_new -
> Asserti...
> FAILED tests/test_ssl.py::MiscSSLClientTestCase::test_verify_cb_new_class -
> A...
> FAILED tests/test_ssl.py::MiscSSLClientTestCase::test_verify_cb_new_function
> FAILED tests/test_ssl.py::MiscSSLClientTestCase::test_verify_cb_old -
> Asserti...
> ======= 4 failed, 296 passed, 2 skipped, 6 warnings in 81.00s (0:01:21)
> ========
> E: pybuild pybuild:353: test: plugin distutils failed with: exit code=1: cd
> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9_m2crypto/build; python3.9 -m pytest
> tests
> rm -fr -- /tmp/dh-xdg-rundir-ZIPYAK7k
> dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.9
> returned exit code 13
> make: *** [debian/rules:17: build] Error 25
> dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2