lab7: live stand integration fixes and verified evidence

This commit is contained in:
2026-11-26 19:17:22 +03:00
parent 33cec9bb7a
commit 210d645e28
47 changed files with 50612 additions and 80 deletions
+3 -1
View File
@@ -98,7 +98,7 @@ upload_crl_to_openbao() {
[ -s "$CA_CERT" ] && [ -s "$OP_CERT" ] && [ -s "$OP_KEY" ] || return 0
local seal_json sealed
seal_json="$(curl -fsS --cacert "$CA_CERT" "${BAO_ADDR}/v1/sys/seal-status" 2>/dev/null || true)"
sealed="$(printf '%s' "$seal_json" | jq -r '.sealed // "true"' 2>/dev/null || echo true)"
sealed="$(printf '%s' "$seal_json" | jq -r 'if .sealed == false then "false" else "true" end' 2>/dev/null || echo true)"
if [ "$sealed" != "false" ]; then
return 0
fi
@@ -159,6 +159,7 @@ issue_new_leaf() {
local ext_section="v3_server"
[ "$kind" = "client" ] && ext_section="v3_client"
[[ "$san" == *:* ]] || san="DNS:${san}"
local req_cnf="${TMP_DIR}/leaf.req.cnf"
local key_tmp="${TMP_DIR}/leaf.key"
@@ -223,6 +224,7 @@ if [ "$1" = "--issue-test-client" ]; then
t_name="${2:?missing name}"
t_cn="${3:?missing cn}"
t_san="${4:?missing san}"
[[ "$t_san" == *:* ]] || t_san="DNS:${t_san}"
t_dir="${5:?missing out-dir}"
mkdir -p "$t_dir"
issue_new_leaf client "$t_cn" "$t_san" "${t_dir}/${t_name}.crt" "${t_dir}/${t_name}.key" 0644