Files
mtusi2026lab7/evidence/tls-checks.txt
T

19 lines
2.0 KiB
Plaintext

PASS
PASS
PASS
unexpected TLS result
Traceback (most recent call last):
File "C:\Users\elsem\Desktop\вп\lab7\mtusi2026lab7\tests\test_tls_boundaries.py", line 59, in <module>
main()
~~~~^^
File "C:\Users\elsem\Desktop\вп\lab7\mtusi2026lab7\tests\test_tls_boundaries.py", line 53, in main
probe(host,port,role,expected,kind)
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\elsem\Desktop\вп\lab7\mtusi2026lab7\tests\test_tls_boundaries.py", line 37, in probe
subprocess.run(cmd,check=True,cwd=ROOT)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\elsem\anaconda3\Lib\subprocess.py", line 578, in run
raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['docker', 'run', '--rm', '--network', 'messenger-lab7_default', '-v', 'C:\\Users\\elsem\\Desktop\\вп\\lab7\\mtusi2026lab7\\certs\\private\\ca.crt:/ca.crt:ro', '-v', 'C:\\Users\\elsem\\Desktop\\вп\\lab7\\mtusi2026lab7\\certs\\private\\worker-client:/identity:ro', 'python:3.11.9-slim', 'python', '-c', "\nimport ssl,socket,sys,json,urllib.request,urllib.error\nhost,port,identity,expected,kind=sys.argv[1:]\nctx=ssl.create_default_context(cafile='/ca.crt')\nif identity=='yes': ctx.load_cert_chain('/identity/tls.crt','/identity/tls.key')\nok=False\ntry:\n if kind=='http':\n try:\n urllib.request.urlopen('https://'+host+':'+port+'/health/live',context=ctx,timeout=5).read()\n ok=True\n except urllib.error.HTTPError:\n ok=True\n elif kind=='redis':\n with socket.create_connection((host,int(port)),timeout=5) as sock:\n with ctx.wrap_socket(sock,server_hostname=host) as tls:\n tls.sendall(b'*1\\\\r\\\\n$4\\\\r\\\\nPING\\\\r\\\\n')\n ok=bool(tls.recv(256))\nexcept (OSError,urllib.error.URLError): pass\nif ok != (expected=='yes'): raise SystemExit('unexpected TLS result')\nprint('PASS')\n", 'broker', '6379', 'yes', 'yes', 'redis']' returned non-zero exit status 1.