forked from mtusi2026/mtusi2026lab7
lab7: безопасность, mTLS, OpenBao и PKI lifecycle
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"""Lab5: metadata, bytes and dimensions of all contract variants.
|
||||
|
||||
Run against a live stand:
|
||||
python3 student-tests/lab5_variants.py --base-url http://localhost:8080
|
||||
python3 student-tests/lab5_variants.py --base-url https://localhost:8443
|
||||
"""
|
||||
import hashlib
|
||||
import struct
|
||||
@@ -11,9 +11,11 @@ from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'tests'))
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1] / 'scripts'))
|
||||
|
||||
from client import Client, Failure, arguments, check, run # noqa: E402
|
||||
from image_probe import jpeg_size # noqa: E402
|
||||
from lab7_http import BASE_URL, CA_FILE # noqa: E402
|
||||
|
||||
FIXTURE = Path(__file__).resolve().parents[1] / 'tests/fixtures/sample.png'
|
||||
|
||||
@@ -41,7 +43,7 @@ def webp_size(data):
|
||||
|
||||
def main():
|
||||
args = arguments('Lab5 variant contract')
|
||||
client = Client(args.base_url, args.ca_file)
|
||||
client = Client(args.base_url or BASE_URL, args.ca_file or CA_FILE)
|
||||
alice, bob, _, chat = client.bootstrap()
|
||||
|
||||
attached, content = client.attachment(alice, chat)
|
||||
|
||||
Reference in New Issue
Block a user