Visitar URL original
test_ssl fails after 2038 · Issue #101732 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20230304214107/https://github.com/python/cpython/issues/101732
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_ssl fails after 2038 #101732

Open
blemouzy opened this issue Feb 9, 2023 · 1 comment
Open

test_ssl fails after 2038 #101732

blemouzy opened this issue Feb 9, 2023 · 1 comment
Labels
expert-SSL tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@blemouzy
Copy link

blemouzy commented Feb 9, 2023 •

Environment

  • i.MX6 32 bits CPU
  • Yocto Kirkstone (kirkstone-4.0.6)
  • Linux 5.10.109
  • glibc 2.35 (8d125a1f9145ad90c94e438858d6b5b7578686f2)
  • openssl 3.0.7
  • Python 3.10.8
  • RFS built with "-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64" flags
  • System date set after 011903142038 (2038 Jan 19 03:14:00)
# openssl version
OpenSSL 3.0.7 1 Nov 2022 (Library: OpenSSL 3.0.7 1 Nov 2022)

# python3 -V
Python 3.10.8

# date
Thu Jan 19 04:04:50 UTC 2040

Description

test_ssl returns the following error on 32 bits board with system date after 2038:

======================================================================
FAIL: test_session (test.test_ssl.ThreadedTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.10/test/test_ssl.py", line 4366, in test_session
    self.assertGreater(session.time, 0)
AssertionError: -2084411619 not greater than 0

----------------------------------------------------------------------

The same test passes with a system date before 2038.

How to reproduce

  • Set enddate to 20421028142316Z in make_ssl_certs.py file
  • Run make_ssl_certs.py to create new certificates
  • Update test_ssl.py and test_asyncio/utils.py according to make_ssl_certs.py output
  • Run the following command:
python3 -m test test_ssl -v
@blemouzy blemouzy added the type-bug An unexpected behavior, bug, or error label Feb 9, 2023
@arhadthedev arhadthedev added tests Tests in the Lib/test dir expert-SSL labels Feb 9, 2023
@sobolevn
Copy link
Member

sobolevn commented Feb 9, 2023

We have plenty of time to fix this one! (joking, sorry) 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
expert-SSL tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants