]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-119400: make_ssl_certs: update reference test data automatically, pass in expirat...
authorAlexander Kanavin <alex.kanavin@gmail.com>
Wed, 25 Sep 2024 21:23:47 +0000 (23:23 +0200)
committerGitHub <noreply@github.com>
Wed, 25 Sep 2024 21:23:47 +0000 (21:23 +0000)
commit1ff1b899ce13b195d978736b78cd75ac021e64b5
tree373b8f7ec76bc08e0e77031f3b49db606a453216
parent17a544b257ee3aeaa525350717ee56fd409d9c08
gh-119400:  make_ssl_certs: update reference test data automatically, pass in expiration dates as parameters #119400  (GH-119401)

* Lib/test/certdata: do not hardcode reference cert data into tests

The script was simply printing the reference data and asking
users to update it by hand into the test suites. This can
be easily improved by writing the data into files and
having the test cases load the files.

* make_ssl_certs: make it possible to pass in expiration dates from command line

Note that in this commit, the defaults are same as they were,
so if nothing is specified the script works as before.

---------

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Lib/test/certdata/keycert.pem.reference [new file with mode: 0644]
Lib/test/certdata/keycert3.pem.reference [new file with mode: 0644]
Lib/test/certdata/make_ssl_certs.py
Lib/test/test_asyncio/utils.py
Lib/test/test_ssl.py
Misc/NEWS.d/next/Build/2024-05-22-13-18-02.gh-issue-119400.WEt83v.rst [new file with mode: 0644]