forked from mtusi2026/mtusi2026lab7
Лабораторная 7: безопасность, mTLS и OpenBao, оценка 3
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
import ssl,time,urllib.request
|
||||
ctx=ssl.create_default_context(cafile='secrets/ca.crt')
|
||||
for _ in range(90):
|
||||
try:
|
||||
with urllib.request.urlopen('https://localhost:8443/health/ready',context=ctx,timeout=2) as r:
|
||||
if r.status==200: break
|
||||
except OSError: pass
|
||||
time.sleep(1)
|
||||
else: raise SystemExit('HTTPS API readiness timeout')
|
||||
print('HTTPS API ready with verified CA/hostname')
|
||||
Reference in New Issue
Block a user