From b249ea0c82226c8f1e3c9bf81ccf813b7ba2395f Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 26 Apr 2024 14:01:02 +0200 Subject: [PATCH 1/2] test_ssl: print complete diff (to make CI output more useful) Signed-off-by: Alexander Kanavin --- Lib/test/test_ssl.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 216aa84a8c147b..b93fa0ed99f8ce 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -383,6 +383,7 @@ def test_random(self): ssl.RAND_add(bytearray(b"this is a random bytearray object"), 75.0) def test_parse_cert(self): + self.maxDiff = None # note that this uses an 'unofficial' function in _ssl.c, # provided solely for this test, to exercise the certificate # parsing code From c3d4d01c9d5d62aa9ebf56fb4cba4315a9cf671a Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Thu, 26 Sep 2024 12:20:49 +0200 Subject: [PATCH 2/2] Lib/test: produce test certificates that expire far in the future by default This allows testing Y2038 with system time set to after that, so that actual Y2038 issues can be exposed, and not masked by expired certificate errors. Signed-off-by: Alexander Kanavin --- Lib/test/certdata/make_ssl_certs.py | 4 ++-- .../next/Tests/2023-08-03-17-26-55.gh-issue-107562.ZnbscS.rst | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Tests/2023-08-03-17-26-55.gh-issue-107562.ZnbscS.rst diff --git a/Lib/test/certdata/make_ssl_certs.py b/Lib/test/certdata/make_ssl_certs.py index 48f980124e1198..7a1f9e12a999ff 100644 --- a/Lib/test/certdata/make_ssl_certs.py +++ b/Lib/test/certdata/make_ssl_certs.py @@ -9,8 +9,8 @@ from subprocess import * startdate = "20180829142316Z" -enddate_default = "20371028142316Z" -days_default = "7000" +enddate_default = "25251028142316Z" +days_default = "140000" req_template = """ [ default ] diff --git a/Misc/NEWS.d/next/Tests/2023-08-03-17-26-55.gh-issue-107562.ZnbscS.rst b/Misc/NEWS.d/next/Tests/2023-08-03-17-26-55.gh-issue-107562.ZnbscS.rst new file mode 100644 index 00000000000000..cc368d4bdffbd2 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2023-08-03-17-26-55.gh-issue-107562.ZnbscS.rst @@ -0,0 +1,3 @@ +Test certificates have been updated to expire far in the future. This allows +testing Y2038 with system time set to after that, so that actual Y2038 +issues can be exposed, and not masked by expired certificate errors.