]> git.ipfire.org Git - thirdparty/dehydrated.git/commitdiff
add host header to ocsp request
authorLukas Schauer <lukas@schauer.so>
Wed, 12 Jul 2017 13:33:56 +0000 (15:33 +0200)
committerLukas Schauer <lukas@schauer.so>
Wed, 12 Jul 2017 13:33:56 +0000 (15:33 +0200)
dehydrated

index 785ea4c3a25215c4755362cc4d50c320df6ba60e..7b8bd6d176e1b6a61b1602d9b5defc29776f35b6 100755 (executable)
@@ -1045,7 +1045,7 @@ command_sign_domains() {
       if [[ "${update_ocsp}" = "yes" ]]; then
         echo " + Updating OCSP stapling file"
         ocsp_timestamp="$(date +%s)"
-        "${OPENSSL}" ocsp -no_nonce -issuer "${chain}" -verify_other "${chain}" -cert "${cert}" -respout "${CERTDIR}/${domain}/ocsp-${ocsp_timestamp}.der" -url "${ocsp_url}" > /dev/null 2>&1
+        "${OPENSSL}" ocsp -no_nonce -issuer "${chain}" -verify_other "${chain}" -cert "${cert}" -respout "${CERTDIR}/${domain}/ocsp-${ocsp_timestamp}.der" -url "${ocsp_url}" -header "HOST=$(echo "${ocsp_url}" | _sed 's/^http(s?):\/\///')" > /dev/null 2>&1
         ln -sf "${CERTDIR}/${domain}/ocsp-${ocsp_timestamp}.der" "${CERTDIR}/${domain}/ocsp.der"
       fi
     fi