Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 53930cb

Browse filesBrowse files
authored
gh-107562: make_ssl_certs.py: produce test certificates that expire far in the future by default (GH-107594)
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 <alex.kanavin@gmail.com>
1 parent 21c04e1 commit 53930cb
Copy full SHA for 53930cb

File tree

Expand file treeCollapse file tree

3 files changed

+6
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+6
-2
lines changed
Open diff view settings
Collapse file

‎Lib/test/certdata/make_ssl_certs.py‎

Copy file name to clipboardExpand all lines: Lib/test/certdata/make_ssl_certs.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
from subprocess import *
1010

1111
startdate = "20180829142316Z"
12-
enddate_default = "20371028142316Z"
13-
days_default = "7000"
12+
enddate_default = "25251028142316Z"
13+
days_default = "140000"
1414

1515
req_template = """
1616
[ default ]
Collapse file

‎Lib/test/test_ssl.py‎

Copy file name to clipboardExpand all lines: Lib/test/test_ssl.py
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ def test_random(self):
383383
ssl.RAND_add(bytearray(b"this is a random bytearray object"), 75.0)
384384

385385
def test_parse_cert(self):
386+
self.maxDiff = None
386387
# note that this uses an 'unofficial' function in _ssl.c,
387388
# provided solely for this test, to exercise the certificate
388389
# parsing code
Collapse file
+3Lines changed: 3 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Test certificates have been updated to expire far in the future. This allows
2+
testing Y2038 with system time set to after that, so that actual Y2038
3+
issues can be exposed, and not masked by expired certificate errors.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.