]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fix OCSP_check.sh to also use decimal for stdout verification.
authorSteffan Karger <steffan@karger.me>
Sun, 27 Apr 2014 08:49:21 +0000 (10:49 +0200)
committerGert Doering <gert@greenie.muc.de>
Sun, 27 Apr 2014 12:43:59 +0000 (14:43 +0200)
This is an extra fix needed on top of 959d607, which already changes the
serial parameter to correctly use decimal representation.

Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1398588561-18964-2-git-send-email-steffan@karger.me>
URL: http://article.gmane.org/gmane.network.openvpn.devel/8650
Signed-off-by: Gert Doering <gert@greenie.muc.de>
contrib/OCSP_check/OCSP_check.sh

index 7e9e1e89b88d8c2de8750ad84e5bee6f1a54d627..553c3dcec97068ea9f27b4e44a617187e6ce8f7b 100644 (file)
@@ -71,7 +71,7 @@ if [ $check_depth -eq -1 ] || [ $cur_depth -eq $check_depth ]; then
   # - The serial number must not be empty
   # - The exit status of "openssl ocsp" must be zero
   # - The output of the above command must contain the line
-  #   "0x${serial}: good"
+  #   "${serial}: good"
   #
   # Everything else fails with exit status 1.
 
@@ -83,7 +83,7 @@ if [ $check_depth -eq -1 ] || [ $cur_depth -eq $check_depth ]; then
     # Sample output that is assumed here:
     #
     # Response verify OK
-    # 0x428740A5: good
+    # 4287405: good
     #      This Update: Apr 24 19:38:49 2010 GMT
     #      Next Update: May  2 14:23:42 2010 GMT
     #
@@ -101,7 +101,7 @@ if [ $check_depth -eq -1 ] || [ $cur_depth -eq $check_depth ]; then
 
     if [ $? -eq 0 ]; then
       # check that it's good
-      if echo "$status" | grep -Fq "0x${serial}: good"; then
+      if echo "$status" | grep -Fq "^${serial}: good"; then
         exit 0
       fi
     fi