]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
cipher-listings: use the sed found by configure script and make it portable
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Fri, 13 Jul 2018 09:18:21 +0000 (11:18 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Fri, 13 Jul 2018 11:38:12 +0000 (13:38 +0200)
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
tests/cipher-listings.sh

index f5fcbbbc7b75046da3f2863aacfc2ee6fc48ef7a..094ae5f38f9e94648fdacb3e11c479de15c6481c 100755 (executable)
@@ -23,6 +23,7 @@
 srcdir="${srcdir:-.}"
 CLI="${CLI:-../src/gnutls-cli${EXEEXT}}"
 DIFF="${DIFF:-diff -b -B}"
+SED="${SED:-sed}"
 unset RETCODE
 
 TMPFILE=cipher-listings.$$.tmp
@@ -45,13 +46,14 @@ fi
 
 echo "Checking ciphersuite listings"
 
+tab=$(printf '\t')
 check()
 {
        prio=$2
        name=$1
        echo checking $prio
-       "${CLI}" --list --priority $prio|grep -v ^Certificate|grep -v ^Ciphers|grep -v ^MACs|grep -v ^Key|grep -v Compression|grep -v ^Groups|grep -v ^Elliptic|sed -e 's/\tSSL3.0$//g' -e 's/\tTLS1.0$//g'|grep -v ^PK>$TMPFILE
-       cat ${srcdir}/data/listings-$name|sed 's/\tSSL3.0$//g' >$TMPFILE2
+       "${CLI}" --list --priority $prio|grep -v ^Certificate|grep -v ^Ciphers|grep -v ^MACs|grep -v ^Key|grep -v Compression|grep -v ^Groups|grep -v ^Elliptic|${SED} -e 's/'"${tab}"'SSL3.0$//g' -e 's/'"${tab}"'TLS1.0$//g'|grep -v ^PK>$TMPFILE
+       cat ${srcdir}/data/listings-$name|${SED} 's/'"${tab}"'SSL3.0$//g' >$TMPFILE2
        ${DIFF} ${TMPFILE} ${TMPFILE2}
        if test $? != 0;then
                echo Error checking $prio with $name