Changeset 65e66c9 in mod_gnutls for test/runtest.py
- Timestamp:
- Nov 28, 2020, 3:46:31 PM (3 months ago)
- Branches:
- asyncio
- Parents:
- 7eb4233
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/runtest.py
r7eb4233 r65e66c9 65 65 66 66 67 def check_ocsp_responder():67 async def check_ocsp_responder(): 68 68 # Check if OCSP responder works 69 69 issuer_cert = 'authority/x509.pem' 70 70 check_cert = 'authority/server/x509.pem' 71 command = ['ocsptool', '--ask', '--nonce',72 '--load-issuer', issuer_cert,73 '--load-cert', check_cert]74 return subprocess.run(command).returncode== 075 76 77 def check_msva():71 proc = await asyncio.create_subprocess_exec( 72 'ocsptool', '--ask', '--nonce', 73 '--load-issuer', issuer_cert, '--load-cert', check_cert) 74 return (await proc.wait()) == 0 75 76 77 async def check_msva(): 78 78 # Check if MSVA is up 79 79 cert_file = 'authority/client/x509.pem' … … 81 81 with open(uid_file, 'r') as file: 82 82 uid = file.read().strip() 83 command = ['msva-query-agent', 'https', uid, 'x509pem', 'client'] 84 with open(cert_file, 'r') as cert: 85 return subprocess.run(command, stdin=cert).returncode == 0 83 with open(cert_file, 'r') as cert: 84 proc = await asyncio.create_subprocess_exec( 85 'msva-query-agent', 'https', uid, 'x509pem', 'client', 86 stdin=cert) 87 return (await proc.wait()) == 0 86 88 87 89
Note: See TracChangeset
for help on using the changeset viewer.