Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 431458 - dev-python/m2crypto-0.21.1 fails tests
Summary: dev-python/m2crypto-0.21.1 fails tests
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-15 03:13 UTC by Patrick Lauer
Modified: 2016-11-06 15:23 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Lauer gentoo-dev 2012-08-15 03:13:40 UTC
======================================================================
ERROR: test_signEncryptDecryptVerify (tests.test_smime.SMIMETestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/tests/test_smime.py", line 198, in test_signEncryptDecryptVerify
    v = s.verify(p7)
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/M2Crypto/SMIME.py", line 215, in verify
    blob = m2.pkcs7_verify0(p7, self.x509_stack._ptr(), self.x509_store._ptr(), flags)
PKCS7_Error: certificate verify error

======================================================================
ERROR: test_verify (tests.test_smime.SMIMETestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/tests/test_smime.py", line 77, in test_verify
    v = s.verify(p7, data)
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/M2Crypto/SMIME.py", line 217, in verify
    blob = m2.pkcs7_verify1(p7, self.x509_stack._ptr(), self.x509_store._ptr(), data_bio._ptr(), flags)
PKCS7_Error: certificate verify error

======================================================================
ERROR: test_HTTPSConnection_resume_session (tests.test_ssl.HttpslibSSLClientTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/tests/test_ssl.py", line 157, in test_HTTPSConnection_resume_session
    c.request('GET', '/')
  File "/usr/lib64/python2.7/httplib.py", line 958, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib64/python2.7/httplib.py", line 992, in _send_request
    self.endheaders(body)
  File "/usr/lib64/python2.7/httplib.py", line 954, in endheaders
    self._send_output(message_body)
  File "/usr/lib64/python2.7/httplib.py", line 814, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.7/httplib.py", line 776, in send
    self.connect()
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/M2Crypto/httpslib.py", line 50, in connect
    self.sock.connect((self.host, self.port))
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/M2Crypto/SSL/Connection.py", line 179, in connect
    ret = self.connect_ssl()
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/M2Crypto/SSL/Connection.py", line 172, in connect_ssl
    return m2.ssl_connect(self.ssl)
SSLError: certificate verify failed

======================================================================
ERROR: test_HTTPSConnection_secure_context (tests.test_ssl.HttpslibSSLClientTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/tests/test_ssl.py", line 190, in test_HTTPSConnection_secure_context
    c.request('GET', '/')
  File "/usr/lib64/python2.7/httplib.py", line 958, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib64/python2.7/httplib.py", line 992, in _send_request
    self.endheaders(body)
  File "/usr/lib64/python2.7/httplib.py", line 954, in endheaders
    self._send_output(message_body)
  File "/usr/lib64/python2.7/httplib.py", line 814, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.7/httplib.py", line 776, in send
    self.connect()
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/M2Crypto/httpslib.py", line 50, in connect
    self.sock.connect((self.host, self.port))
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/M2Crypto/SSL/Connection.py", line 179, in connect
    ret = self.connect_ssl()
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/M2Crypto/SSL/Connection.py", line 172, in connect_ssl
    return m2.ssl_connect(self.ssl)
SSLError: certificate verify failed

======================================================================
ERROR: test_HTTPS_secure_context (tests.test_ssl.HttpslibSSLClientTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/tests/test_ssl.py", line 239, in test_HTTPS_secure_context
    c.endheaders()
  File "/usr/lib64/python2.7/httplib.py", line 954, in endheaders
    self._send_output(message_body)
  File "/usr/lib64/python2.7/httplib.py", line 814, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.7/httplib.py", line 776, in send
    self.connect()
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/M2Crypto/httpslib.py", line 50, in connect
    self.sock.connect((self.host, self.port))
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/M2Crypto/SSL/Connection.py", line 179, in connect
    ret = self.connect_ssl()
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/M2Crypto/SSL/Connection.py", line 172, in connect_ssl
    return m2.ssl_connect(self.ssl)
SSLError: certificate verify failed

======================================================================
ERROR: test_urllib2_secure_context (tests.test_ssl.Urllib2SSLClientTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/tests/test_ssl.py", line 915, in test_urllib2_secure_context
    u = opener.open('https://%s:%s/' % (srv_host, srv_port))
  File "/usr/lib64/python2.7/urllib2.py", line 400, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.7/urllib2.py", line 418, in _open
    '_open', req)
  File "/usr/lib64/python2.7/urllib2.py", line 378, in _call_chain
    result = func(*args)
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/M2Crypto/m2urllib2.py", line 83, in https_open
    h.request(req.get_method(), req.get_selector(), req.data, headers)
  File "/usr/lib64/python2.7/httplib.py", line 958, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib64/python2.7/httplib.py", line 992, in _send_request
    self.endheaders(body)
  File "/usr/lib64/python2.7/httplib.py", line 954, in endheaders
    self._send_output(message_body)
  File "/usr/lib64/python2.7/httplib.py", line 814, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.7/httplib.py", line 776, in send
    self.connect()
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/M2Crypto/httpslib.py", line 50, in connect
    self.sock.connect((self.host, self.port))
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/M2Crypto/SSL/Connection.py", line 179, in connect
    ret = self.connect_ssl()
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/M2Crypto/SSL/Connection.py", line 172, in connect_ssl
    return m2.ssl_connect(self.ssl)
SSLError: certificate verify failed

======================================================================
ERROR: test_server_simple_secure_context (tests.test_ssl.MiscSSLClientTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/tests/test_ssl.py", line 298, in test_server_simple_secure_context
    s.connect(self.srv_addr)
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/M2Crypto/SSL/Connection.py", line 179, in connect
    ret = self.connect_ssl()
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/M2Crypto/SSL/Connection.py", line 172, in connect_ssl
    return m2.ssl_connect(self.ssl)
SSLError: certificate verify failed

======================================================================
FAIL: test_sslv23_no_v2 (tests.test_ssl.MiscSSLClientTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/tests/test_ssl.py", line 385, in test_sslv23_no_v2
    self.failUnlessEqual(s.get_version(), 'SSLv3')
AssertionError: 'TLSv1.2' != 'SSLv3'

======================================================================
FAIL: test_sslv23_no_v2_no_service (tests.test_ssl.MiscSSLClientTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/tests/test_ssl.py", line 398, in test_sslv23_no_v2_no_service
    self.assertRaises(SSL.SSLError, s.connect, self.srv_addr)
AssertionError: SSLError not raised

======================================================================
FAIL: test_sslv23_weak_crypto (tests.test_ssl.MiscSSLClientTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/tests/test_ssl.py", line 415, in test_sslv23_weak_crypto
    self.assertRaises(SSL.SSLError, s.connect, self.srv_addr)
AssertionError: SSLError not raised

======================================================================
FAIL: test_verify_cert (tests.test_ssl.MiscSSLClientTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/tests/test_ssl.py", line 699, in test_verify_cert
    assert 0, e
AssertionError: certificate verify failed

======================================================================
FAIL: test_verify_cert_mutual_auth (tests.test_ssl.MiscSSLClientTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/tests/test_ssl.py", line 730, in test_verify_cert_mutual_auth
    assert 0, e
AssertionError: certificate verify failed

======================================================================
FAIL: test_verify_cert_mutual_auth_servernbio (tests.test_ssl.MiscSSLClientTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/m2crypto-0.21.1/work/M2Crypto-0.21.1/tests/test_ssl.py", line 749, in test_verify_cert_mutual_auth_servernbio
    assert 0, e
AssertionError: certificate verify failed

----------------------------------------------------------------------
Ran 237 tests in 64.279s

FAILED (failures=6, errors=7)
 * ERROR: dev-python/m2crypto-0.21.1 failed (test phase):
 *   Testing failed with CPython 2.7 in distutils_testing() function
Comment 1 Patrick Lauer gentoo-dev 2012-08-15 03:13:58 UTC
Portage 2.1.11.10 (default/linux/amd64/10.0, gcc-4.7.1, glibc-2.15-r2, 3.5.0vs2.3.4-vs2.3.4 x86_64)
=================================================================
System uname: Linux-3.5.0vs2.3.4-vs2.3.4-x86_64-AMD_Phenom-tm-_II_X4_965_Processor-with-gentoo-2.1
Timestamp of tree: Unknown
app-shells/bash:          4.2_p37
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/cmake:           2.8.8-r3
dev-util/pkgconfig:       0.27
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.2
sys-devel/binutils:       2.22.90
sys-devel/gcc:            4.7.1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.5 (virtual/os-headers)
sys-libs/glibc:           2.15-r2
Repositories: gentoo qt
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/qt"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl amd64 berkdb bzip2 cli consolekit corefonts cracklib crypt cups cxx dbus dri fortran gdbm gpm iconv ipv6 location mmx modules mudflap multilib ncurses nls nptl ogg opengl openmp openvg pam pcre pcre16 policykit pppd q16 qt3support qt4 readline session sqlite sse sse2 ssl tcpd truetype udev unicode vorbis xa zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 2 Nikoli 2012-10-21 12:30:32 UTC
Several of my systems have same problem. Do you need any info or bug was reproduced?
Comment 3 Ian Delaney (RETIRED) gentoo-dev 2012-11-08 12:07:23 UTC
m2crypto and security and certificates upstream maintainers can fix.

https://bugzilla.osafoundation.org/show_bug.cgi?id=13070
Comment 4 Patrick Lauer gentoo-dev 2013-02-01 02:36:11 UTC
I can reproduce it. Sigh :)
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-02-15 20:47:52 UTC
The tests rely on IP connectivity too. Sad thing.
Comment 6 Michael Palimaka (kensington) gentoo-dev 2013-02-25 11:18:04 UTC
(In reply to comment #5)
> The tests rely on IP connectivity too. Sad thing.

In that case can we restrict them?
Comment 7 Patrice Clement gentoo-dev 2016-11-06 15:02:14 UTC
Closing this bug as per kensington's last comment.
Comment 8 Michael Palimaka (kensington) gentoo-dev 2016-11-06 15:05:17 UTC
It's not legal to access the network during build - the tests need to either be fixed or restricted.
Comment 9 Patrice Clement gentoo-dev 2016-11-06 15:23:14 UTC
As per IRC discussion.
Comment 10 Michael Palimaka (kensington) gentoo-dev 2016-11-06 15:23:27 UTC
Tests have since been restricted.