renamed ocsp hook to deploy_ocsp, exported altnames, added example hook

This commit is contained in:
Lukas Schauer
2018-04-08 22:44:28 +02:00
parent 2fca309e94
commit 8ba56a8048
2 changed files with 24 additions and 2 deletions

View File

@@ -1316,7 +1316,7 @@ command_sign_domains() {
ocsp_log="$("${OPENSSL}" ocsp -no_nonce -issuer "${chain}" -verify_other "${chain}" -cert "${cert}" -respout "${certdir}/ocsp-${ocsp_timestamp}.der" -url "${ocsp_url}" 2>&1)" || _exiterr "Error while fetching OCSP information: ${ocsp_log}"
fi
ln -sf "ocsp-${ocsp_timestamp}.der" "${certdir}/ocsp.der"
[[ -n "${HOOK}" ]] && "${HOOK}" "ocsp_update" "${domain}" "${certdir}/ocsp.der"
[[ -n "${HOOK}" ]] && altnames="${domain} ${morenames}" "${HOOK}" "deploy_ocsp" "${domain}" "${certdir}/ocsp.der" "${ocsp_timestamp}"
else
echo " + OSCP stapling file is still valid (skipping update)"
fi