Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 771636 - dev-python/pyopenssl-20.0.1 fails test: tests/test_crypto.py::TestX509StoreContext::test_verify_with_time - OverflowError: integer 2460474680 does not...
Summary: dev-python/pyopenssl-20.0.1 fails test: tests/test_crypto.py::TestX509StoreCo...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks: time32-bugs 765961
  Show dependency tree
 
Reported: 2021-02-19 17:14 UTC by Thomas Deutschmann (RETIRED)
Modified: 2023-07-18 17:55 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,69.78 KB, text/plain)
2021-02-19 17:14 UTC, Thomas Deutschmann (RETIRED)
Details
build.log (20.0.1, ppc) (pyopenssl-20.0.1:20210404-164820.log,63.53 KB, text/plain)
2021-04-04 16:50 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2021-02-19 17:14:30 UTC
Created attachment 687627 [details]
build.log

> 
> ======================================================= FAILURES =======================================================
> ______________________________________ TestX509StoreContext.test_verify_with_time ______________________________________
> 
> self = <tests.test_crypto.TestX509StoreContext object at 0xb645cd18>
> 
>     def test_verify_with_time(self):
>         """
>         `verify_certificate` raises error when the verification time is
>         set at notAfter.
>         """
>         store = X509Store()
>         store.add_cert(self.root_cert)
>         store.add_cert(self.intermediate_cert)
>     
>         expire_time = self.intermediate_server_cert.get_notAfter()
>         expire_datetime = datetime.strptime(
>             expire_time.decode("utf-8"), "%Y%m%d%H%M%SZ"
>         )
> >       store.set_time(expire_datetime)
> 
> tests/test_crypto.py:4111: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> 
> self = <OpenSSL.crypto.X509Store object at 0xb645c280>, vfy_time = datetime.datetime(2047, 12, 20, 17, 11, 20)
> 
>     def set_time(self, vfy_time):
>         """
>         Set the time against which the certificates are verified.
>     
>         Normally the current time is used.
>     
>         .. note::
>     
>           For example, you can determine if a certificate was valid at a given
>           time.
>     
>         .. versionadded:: 17.0.0
>     
>         :param datetime vfy_time: The verification time to set on this store.
>         :return: ``None`` if the verification time was successfully set.
>         """
>         param = _lib.X509_VERIFY_PARAM_new()
>         param = _ffi.gc(param, _lib.X509_VERIFY_PARAM_free)
>     
> >       _lib.X509_VERIFY_PARAM_set_time(
>             param, calendar.timegm(vfy_time.timetuple())
>         )
> E       OverflowError: integer 2460474680 does not fit '32-bit int'
> 
> ../pyOpenSSL-20.0.1-python3_8/lib/OpenSSL/crypto.py:1679: OverflowError
> =================================================== warnings summary ===================================================
> ../../../../../../../usr/lib/python3.8/site-packages/_pytest/config/__init__.py:1233
>   /usr/lib/python3.8/site-packages/_pytest/config/__init__.py:1233: PytestConfigWarning: Unknown config option: strict
>   
>     self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")
> 
> tests/test_crypto.py:39
>   /var/tmp/portage/dev-python/pyopenssl-20.0.1/work/pyOpenSSL-20.0.1/tests/test_crypto.py:39: DeprecationWarning: PKCS#7 support in pyOpenSSL is deprecated. You should use the APIs in cryptography.
>     from OpenSSL.crypto import PKCS7, load_pkcs7_data
> 
> tests/test_crypto.py:40
>   /var/tmp/portage/dev-python/pyopenssl-20.0.1/work/pyOpenSSL-20.0.1/tests/test_crypto.py:40: DeprecationWarning: PKCS#12 support in pyOpenSSL is deprecated. You should use the APIs in cryptography.
>     from OpenSSL.crypto import PKCS12, load_pkcs12
> 
> tests/test_ssl.py::TestContext::test_set_cipher_list[hello world:AES128-SHA1]
>   /var/tmp/portage/dev-python/pyopenssl-20.0.1/work/pyOpenSSL-20.0.1/tests/test_ssl.py:493: DeprecationWarning: str for cipher_list is no longer accepted, use bytes
>     context.set_cipher_list(cipher_string)
> 
> tests/test_ssl.py::TestConnection::test_client_set_session
>   /var/tmp/portage/dev-python/pyopenssl-20.0.1/work/pyOpenSSL-20.0.1/tests/test_ssl.py:2637: DeprecationWarning: str for buf is no longer accepted, use bytes
>     ctx.set_session_id("unity-test")
> 
> -- Docs: https://docs.pytest.org/en/stable/warnings.html
> ===Flaky Test Report===
> 
> test_gmtime_adj_notBefore passed 1 out of the required 1 times. Success!
> test_gmtime_adj_notAfter passed 1 out of the required 1 times. Success!
> test_set_cipher_list_no_cipher_match passed 1 out of the required 1 times. Success!
> 
> ===End Flaky Test Report===
> =============================================== short test summary info ================================================
> FAILED tests/test_crypto.py::TestX509StoreContext::test_verify_with_time - OverflowError: integer 2460474680 does not...
> ================================ 1 failed, 520 passed, 3 skipped, 5 warnings in 11.18s =================================
>  * ERROR: dev-python/pyopenssl-20.0.1::gentoo failed (test phase):
>  *   Tests fail with python3.8


Portage 3.0.13 (python 3.8.7-final-0, default/linux/x86/17.0, gcc-9.3.0, glibc-2.32-r6, 5.4.97-gentoo-x86 i686)
=================================================================
System uname: Linux-5.4.97-gentoo-x86-i686-with-glibc2.1.3
KiB Mem:     3106076 total,   1997316 free
KiB Swap:    8387560 total,   8357436 free
Timestamp of repository gentoo: Fri, 19 Feb 2021 14:37:40 +0000
Head commit of repository gentoo: fc67b33c6e61f1f439ffc270260e06cce6ee7dde

sh bash 5.0_p18
ld GNU ld (Gentoo 2.35.1 p2) 2.35.1
ccache version 4.1 [enabled]
app-shells/bash:          5.0_p18::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          3.8.7-r1::gentoo, 3.9.1-r1::gentoo
dev-util/ccache:          4.1::gentoo
dev-util/cmake:           3.18.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.2-r1::gentoo
sys-devel/binutils:       2.35.1-r1::gentoo
sys-devel/gcc:            9.3.0-r2::gentoo
sys-devel/gcc-config:     2.3.2-r1::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r6::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/sync/gentoo.git
    priority: -1000

ABI="x86"
ABI_X86="32"
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
ACCEPT_PROPERTIES="*"
ACCEPT_RESTRICT="*"
ADA_TARGET="gnat_2018"
ARCH="x86"
BINPKG_COMPRESS="bzip2"
BROOT=""
CBUILD="i686-pc-linux-gnu"
CCACHE_DIR="/var/cache/ccache"
CFLAGS="-O2 -pipe -march=pentium4m -mtune=pentium4m -Wno-error=jump-misses-init -Wno-error=sign-compare"
CHOST="i686-pc-linux-gnu"
CHOST_x86="i686-pc-linux-gnu"
COLLISION_IGNORE="/lib/modules/*"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CPU_FLAGS_X86="mmx mmxext sse sse2"
CXXFLAGS="-O2 -pipe -march=pentium4m -mtune=pentium4m -Wno-error=jump-misses-init -Wno-error=sign-compare"
DCC_EMAILLOG_WHOM_TO_BLAME=""
DEFAULT_ABI="x86"
DISTCC_ENABLE_DISCREPANCY_EMAIL=""
DISTCC_FALLBACK="1"
DISTCC_SAVE_TEMPS="0"
DISTCC_SSH=""
DISTCC_TCP_CORK=""
DISTCC_VERBOSE="0"
EDITOR="/usr/bin/mcedit"
ELIBC="glibc"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
EPREFIX=""
EROOT="/"
ESYSROOT="/"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg ccache cgroup config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=i686 -pipe"
GCC_SPECS=""
GRUB_PLATFORMS="efi-32 pc"
GSETTINGS_BACKEND="dconf"
HOME="/root"
INFOPATH="/usr/share/gcc-data/i686-pc-linux-gnu/9.3.0/info:/usr/share/binutils-data/i686-pc-linux-gnu/2.35.1/info:/usr/share/info"
INPUT_DEVICES="libinput"
IUSE_IMPLICIT="abi_x86_32 prefix prefix-guest prefix-stack"
KERNEL="linux"
L10N="en en-US de de-DE"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LC_MESSAGES="C"
LC_PAPER="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LIBDIR_x86="lib"
LINGUAS="en de"
LOGNAME="root"
LUA_SINGLE_TARGET="lua5-1"
LUA_TARGETS="lua5-1"
MAIL="/var/mail/root"
MAKEOPTS="--jobs 5 --load-average 7.95"
MANPAGER="manpager"
MOTD_SHOWN="pam"
MULTILIB_ABIS="x86"
NOCOLOR="true"
OFFICE_IMPLEMENTATION="libreoffice"
OPENCL_PROFILE="ocl-icd"
OPENGL_PROFILE="xorg-x11"
PAGER="/usr/bin/less"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/11/bin"
PHP_TARGETS="php7-3 php7-4"
POSTGRES_TARGETS="postgres10 postgres11"
PWD="/root"
PYTHONDONTWRITEBYTECODE="1"
PYTHON_SINGLE_TARGET="python3_8"
PYTHON_TARGETS="python3_8"
QT_GRAPHICSSYSTEM="raster"
ROOT="/"
ROOTPATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/lib/llvm/11/bin"
RUBY_TARGETS="ruby25 ruby26"
SHELL="/bin/bash"
SHLVL="2"
SSH_TTY="/dev/pts/0"
SYSROOT="/"
TERM="tmux-256color"
TMUX="/tmp//tmux-0/default,3324,0"
TMUX_PANE="%2"
TWISTED_DISABLE_WRITING_OF_PLUGIN_CACHE="1"
UNCACHED_ERR_FD=""
USER="root"
USERLAND="GNU"
VIDEO_CARDS="vmware"
XDG_RUNTIME_DIR="/run/user/0"
XDG_SESSION_CLASS="user"
XDG_SESSION_ID="2"
XDG_SESSION_TYPE="tty"
Comment 1 ernsteiswuerfel archtester 2021-04-04 16:50:42 UTC
Created attachment 697176 [details]
build.log (20.0.1, ppc)

Same on ppc.
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-04-12 13:45:40 UTC
Upstream hasn't addressed this for almost 4 years now, so I doubt it's gonna happen.
Comment 3 Larry the Git Cow gentoo-dev 2021-04-12 14:08:05 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b162e302e7d24fc8c858398efc074f8c1372d56b

commit b162e302e7d24fc8c858398efc074f8c1372d56b
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2021-04-12 14:07:40 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2021-04-12 14:07:40 +0000

    dev-python/pyopenssl: Skip broken test with 32-bit time_t
    
    Closes: https://bugs.gentoo.org/771636
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/pyopenssl/pyopenssl-20.0.1.ebuild | 29 +++++++++++++++++++++-------
 1 file changed, 22 insertions(+), 7 deletions(-)