Skip to content

Commit e3ec72a

Browse files
authored
Merge pull request #3018 from dcooper16/ossl4_ocsp
OpenSSL 4 compatibility for stapled OCSP responses
2 parents b14ed4d + a0b1f13 commit e3ec72a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

testssl.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10218,7 +10218,7 @@ certificate_info() {
1021810218

1021910219
out "$indent"; pr_bold " OCSP stapling "
1022010220
jsonID="OCSP_stapling"
10221-
if grep -a "OCSP response" <<< "$ocsp_response" | grep -q "no response sent" ; then
10221+
if grep -a "OCSP response" <<< "$ocsp_response" | grep -Eq "no response[s]? sent" ; then
1022210222
if [[ -n "$ocsp_uri" ]]; then
1022310223
pr_svrty_low "not offered"
1022410224
fileout "${jsonID}${json_postfix}" "LOW" "not offered"
@@ -10638,10 +10638,10 @@ run_server_defaults() {
1063810638
# response so that certificate_info() can determine
1063910639
# whether it includes a certificate transparency extension.
1064010640
ocsp_response_binary[certs_found]="$STAPLED_OCSP_RESPONSE"
10641-
if grep -a "OCSP response:" $TMPFILE | grep -q "no response sent"; then
10641+
if grep -aE "OCSP response[s]?:" $TMPFILE | grep -Eq "no response[s]? sent"; then
1064210642
ocsp_response[certs_found]="$(grep -a "OCSP response" $TMPFILE)"
1064310643
else
10644-
ocsp_response[certs_found]="$(awk -v n=2 '/OCSP response:/ {start=1; inc=2} /======================================/ { if (start) {inc--} } inc' $TMPFILE)"
10644+
ocsp_response[certs_found]="$(awk -v n=2 '/OCSP response[s]?:/ {start=1; inc=2} /======================================/ { if (start) {inc--} } inc' $TMPFILE)"
1064510645
fi
1064610646
ocsp_response_status[certs_found]=$(grep -a "OCSP Response Status" $TMPFILE)
1064710647
previous_hostcert[certs_found]=$newhostcert

0 commit comments

Comments
 (0)