summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2018-07-13 11:18:21 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2018-07-13 13:38:12 +0200
commit32aaa3a5b6ee328e31209d2ce17d60af2ff3739e (patch)
treec2d07457deef9239af3b62a0145d14886d0c47df
parent16939ac38c98befa94d6dd6d78130bab5cbb1167 (diff)
downloadgnutls-32aaa3a5b6ee328e31209d2ce17d60af2ff3739e.tar.gz
cipher-listings: use the sed found by configure script and make it portable
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rwxr-xr-xtests/cipher-listings.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/cipher-listings.sh b/tests/cipher-listings.sh
index f5fcbbbc7b..094ae5f38f 100755
--- a/tests/cipher-listings.sh
+++ b/tests/cipher-listings.sh
@@ -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