Browse code

Fix OCSP_check.sh to also use decimal for stdout verification.

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>
(cherry picked from commit 6ea78cbef6367590567156a20106c620fec224c9)

Steffan Karger authored on 2014/04/27 17:49:21
Showing 1 changed files
... ...
@@ -71,7 +71,7 @@ if [ $check_depth -eq -1 ] || [ $cur_depth -eq $check_depth ]; then
71 71
   # - The serial number must not be empty
72 72
   # - The exit status of "openssl ocsp" must be zero
73 73
   # - The output of the above command must contain the line
74
-  #   "0x${serial}: good"
74
+  #   "${serial}: good"
75 75
   #
76 76
   # Everything else fails with exit status 1.
77 77
 
... ...
@@ -83,7 +83,7 @@ if [ $check_depth -eq -1 ] || [ $cur_depth -eq $check_depth ]; then
83 83
     # Sample output that is assumed here:
84 84
     #
85 85
     # Response verify OK
86
-    # 0x428740A5: good
86
+    # 4287405: good
87 87
     #      This Update: Apr 24 19:38:49 2010 GMT
88 88
     #      Next Update: May  2 14:23:42 2010 GMT
89 89
     #
... ...
@@ -101,7 +101,7 @@ if [ $check_depth -eq -1 ] || [ $cur_depth -eq $check_depth ]; then
101 101
 
102 102
     if [ $? -eq 0 ]; then
103 103
       # check that it's good
104
-      if echo "$status" | grep -Fq "0x${serial}: good"; then
104
+      if echo "$status" | grep -Fq "^${serial}: good"; then
105 105
         exit 0
106 106
       fi
107 107
     fi