summaryrefslogtreecommitdiff
path: root/app/openvpn/contrib/OCSP_check
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2014-11-04 20:45:42 +0100
committerParménides GV <parmegv@sdf.org>2014-11-04 20:45:42 +0100
commit5304543ebd60778ad46123cd63142e27627fa150 (patch)
treeb07723b530e20b23ae83de822387f6551ea7f9f4 /app/openvpn/contrib/OCSP_check
parent713c3a98f53a6bd1ad94e90f28d3e37d20abfab9 (diff)
Update ics-openvpn to rev 906.
Diffstat (limited to 'app/openvpn/contrib/OCSP_check')
-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