lab7
Skeleton contracts / contracts (pull_request) Blocked by required conditions

This commit is contained in:
2026-11-26 23:34:55 +03:00
parent 20afc2c790
commit a25f357314
167 changed files with 33202 additions and 89 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
temp=$(mktemp -d)
trap 'rm -rf "$temp"' EXIT
export PKI_DIR="$temp/certs" CA_DIR="$temp/ca"
scripts/bootstrap-pki.sh >/dev/null
openssl verify -CAfile "$PKI_DIR/ca.crt" -verify_hostname api "$PKI_DIR/api/api.crt"
if openssl verify -CAfile "$PKI_DIR/ca.crt" -verify_hostname worker "$PKI_DIR/api/api.crt" >/dev/null 2>&1; then echo 'FAIL hostname accepted'; exit 1; fi
cp "$PKI_DIR/client-api/client-api.crt" "$temp/old.crt"
scripts/bootstrap-pki.sh client-api >/dev/null
openssl verify -CAfile "$PKI_DIR/ca.crt" -CRLfile "$PKI_DIR/ca.crl" -crl_check "$PKI_DIR/client-api/client-api.crt"
if openssl verify -CAfile "$PKI_DIR/ca.crt" -CRLfile "$PKI_DIR/ca.crl" -crl_check "$temp/old.crt" >"$temp/revoked.out" 2>&1; then echo 'FAIL revoked cert accepted'; exit 1; fi
grep -q 'certificate revoked' "$temp/revoked.out"
echo 'PASS: SAN verification; leaf renewal; previous leaf revoked by CRL'