]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
tests: tlsfeature-test will ignore the 'Algorithm Security Level' line in comparisons
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Mon, 30 May 2016 12:19:20 +0000 (14:19 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Mon, 30 May 2016 12:19:23 +0000 (14:19 +0200)
That is to allow depending on the certificate output validation without
relying on "moving" parameters such as the Algorithm Security Level.

tests/cert-tests/tlsfeature-test

index a6452f3c9bc3fd86a3955e7441263d33c73a05a4..eae8a3f91c763ff6e4f8e27d93fe130da7a7d82e 100755 (executable)
@@ -45,7 +45,7 @@ datefudge -s "2007-04-22" \
                --outfile "${TMPFILE}" 2>/dev/null
 rc=$?
 
-${DIFF} "${srcdir}/template-tlsfeature.pem" "${TMPFILE}" >/dev/null 2>&1
+${DIFF} --ignore-matching-lines "Algorithm Security Level" "${srcdir}/template-tlsfeature.pem" "${TMPFILE}" >/dev/null 2>&1
 rc=$?
 
 # We're done.
@@ -101,15 +101,19 @@ datefudge -s "2007-04-22" \
 "${CERTTOOL}" --generate-request \
                --load-privkey "${srcdir}/template-test.key" \
                --template "${srcdir}/template-tlsfeature.tmpl" \
-               --outfile "${TMPFILE}" 2>/dev/null
+               --outfile "${TMPFILE}" -d 4 #2>/dev/null
 rc=$?
+if test "${rc}" != "0"; then
+       echo "CSR generation test (0) failed"
+       exit ${rc}
+fi
 
-${DIFF} "${srcdir}/template-tlsfeature.csr" "${TMPFILE}" >/dev/null 2>&1
+${DIFF} --ignore-matching-lines "Algorithm Security Level" "${srcdir}/template-tlsfeature.csr" "${TMPFILE}" #>/dev/null 2>&1
 rc=$?
 
 # We're done.
 if test "${rc}" != "0"; then
-       echo "CSR generation test failed"
+       echo "CSR generation test (1) failed"
        exit ${rc}
 fi