mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
gh-108303: Move all certificates to Lib/test/certdata/ (#109489)
This commit is contained in:
parent
929cc4e4a0
commit
e57ecf6bbc
41 changed files with 31 additions and 28 deletions
|
|
@ -36,21 +36,21 @@ from test.support import socket_helper
|
|||
from test.support import threading_helper
|
||||
|
||||
|
||||
def data_file(filename):
|
||||
def data_file(*filename):
|
||||
if hasattr(support, 'TEST_HOME_DIR'):
|
||||
fullname = os.path.join(support.TEST_HOME_DIR, filename)
|
||||
fullname = os.path.join(support.TEST_HOME_DIR, *filename)
|
||||
if os.path.isfile(fullname):
|
||||
return fullname
|
||||
fullname = os.path.join(os.path.dirname(__file__), '..', filename)
|
||||
fullname = os.path.join(os.path.dirname(__file__), '..', *filename)
|
||||
if os.path.isfile(fullname):
|
||||
return fullname
|
||||
raise FileNotFoundError(filename)
|
||||
raise FileNotFoundError(os.path.join(filename))
|
||||
|
||||
|
||||
ONLYCERT = data_file('ssl_cert.pem')
|
||||
ONLYKEY = data_file('ssl_key.pem')
|
||||
SIGNED_CERTFILE = data_file('keycert3.pem')
|
||||
SIGNING_CA = data_file('pycacert.pem')
|
||||
ONLYCERT = data_file('certdata', 'ssl_cert.pem')
|
||||
ONLYKEY = data_file('certdata', 'ssl_key.pem')
|
||||
SIGNED_CERTFILE = data_file('certdata', 'keycert3.pem')
|
||||
SIGNING_CA = data_file('certdata', 'pycacert.pem')
|
||||
PEERCERT = {
|
||||
'OCSP': ('http://testca.pythontest.net/testca/ocsp/',),
|
||||
'caIssuers': ('http://testca.pythontest.net/testca/pycacert.cer',),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue