summaryrefslogtreecommitdiff
path: root/app/openvpn/contrib
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2014-11-07 11:00:43 +0100
committerParménides GV <parmegv@sdf.org>2014-11-07 11:00:43 +0100
commit13d154326aaf34798c1232a42318fd71e9df9779 (patch)
tree4ad051ddb4e6faa11b5c67795e9285bb64d1648a /app/openvpn/contrib
parent0009911f6b9320b3bea541f88fcdc30364d2a681 (diff)
parent6544b8d32ccf81a6c1d832217642b873be8dc6b7 (diff)
Merge branch 'develop' into release-0.8.0
Diffstat (limited to 'app/openvpn/contrib')
-rw-r--r--app/openvpn/contrib/OCSP_check/OCSP_check.sh13
1 files changed, 10 insertions, 3 deletions
diff --git a/app/openvpn/contrib/OCSP_check/OCSP_check.sh b/app/openvpn/contrib/OCSP_check/OCSP_check.sh
index 553c3dce..6876c6d8 100644
--- a/app/openvpn/contrib/OCSP_check/OCSP_check.sh
+++ b/app/openvpn/contrib/OCSP_check/OCSP_check.sh
@@ -97,12 +97,19 @@ if [ $check_depth -eq -1 ] || [ $cur_depth -eq $check_depth ]; then
"$nonce" \
-CAfile "$verify" \
-url "$ocsp_url" \
- -serial "${serial}" 2>/dev/null)
+ -serial "${serial}" 2>&1)
if [ $? -eq 0 ]; then
- # check that it's good
+ # check if ocsp didn't report any errors
+ if echo "$status" | grep -Eq "(error|fail)"; then
+ exit 1
+ fi
+ # check that the reported status of certificate is ok
if echo "$status" | grep -Fq "^${serial}: good"; then
- exit 0
+ # check if signature on the OCSP response verified correctly
+ if echo "$status" | grep -Fq "^Response verify OK"; then
+ exit 0
+ fi
fi
fi
fi