Bug 436414, bustage fix, regular expression to extract port number failed if hostname contains a digit
authorKai Engert <kaie@kuix.de>
Tue, 08 Oct 2013 11:41:04 +0200
changeset 10866 b7e765fda4cfc81e6286daae7d8e699b90e7a66b
parent 10865 4ebfd5d268679854f95bb10ee32cb387fcd5583c
child 10867 4be429189df6d552d133e4fdda1d20a8b18b9fa7
push id169
push userkaie@kuix.de
push dateTue, 08 Oct 2013 09:41:12 +0000
bugs436414
Bug 436414, bustage fix, regular expression to extract port number failed if hostname contains a digit
tests/chains/chains.sh
--- a/tests/chains/chains.sh
+++ b/tests/chains/chains.sh
@@ -967,18 +967,19 @@ check_ocsp()
     else
         CERT=${CERT_NICK}${CERT_ISSUER}.der
         CERT_FILE=${CERT}
     fi
 
     # sample line:
     #   URI: "http://ocsp.server:2601"
     OCSP_HOST=$(${BINDIR}/pp -t certificate -i ${CERT_FILE} | grep URI | sed "s/.*:\/\///" | sed "s/:.*//")
-    OCSP_PORT=$(${BINDIR}/pp -t certificate -i ${CERT_FILE} | grep URI | sed "s/.*:.*:\([0-9]*\).*\"/\1/")
+    OCSP_PORT=$(${BINDIR}/pp -t certificate -i ${CERT_FILE} | grep URI | sed "s/^.*:.*:\/\/.*:\([0-9]*\).*$/\1/")
 
+    echo "tstclnt -h ${OCSP_HOST} -p ${OCSP_PORT} -q -t 20"
     tstclnt -h ${OCSP_HOST} -p ${OCSP_PORT} -q -t 20
     return $?
 }
 
 ############################ parse_result ##############################
 # local shell function to process expected result value
 # this function was created for case that expected result depends on
 # some conditions - in our case type of cert DB