]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
x509paths tests moved to suite/.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 15 Apr 2011 07:47:09 +0000 (09:47 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 15 Apr 2011 07:47:09 +0000 (09:47 +0200)
tests/suite/Makefile.am
tests/suite/chain [moved from tests/x509paths/chain with 77% similarity]
tests/suite/testcompat [moved from tests/suite/testbig with 95% similarity]
tests/suite/testcompat-main [moved from tests/suite/testbig-main with 100% similarity]
tests/suite/x509paths/.gitignore [new file with mode: 0644]
tests/suite/x509paths/README [moved from tests/x509paths/README with 88% similarity]
tests/suite/x509paths/certpath1.07.zip [moved from tests/x509paths/certpath1.07.zip with 100% similarity]
tests/suite/x509paths/x509tests.tgz [moved from tests/x509paths/x509tests.tgz with 100% similarity]

index 6c95f437f5e6b784e859bfd043380d6c9919026f..17a587eaa7125e653a6adf206b32c436a9bcc197 100644 (file)
@@ -72,7 +72,7 @@ nodist_eagain_cli_SOURCES = mini-eagain2.c
 
 noinst_PROGRAMS = eagain-cli
 
-nodist_check_SCRIPTS = eagain testsrn testbig
+nodist_check_SCRIPTS = eagain testsrn testcompat chain
 
-TESTS = eagain testsrn testbig
+TESTS = eagain testsrn testcompat chain
 
similarity index 77%
rename from tests/x509paths/chain
rename to tests/suite/chain
index f581fecd437cb21cfdd450ca9974f81993f5945f..ca3468ddbf28e16652afebd62092f66ec63f44df 100755 (executable)
 # along with GnuTLS; if not, write to the Free Software Foundation,
 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 
-CERTTOOL=../../src/certtool
+CERTTOOL=../../../src/certtool
 
 SUCCESS=" 1 4 7 12 15 16 17 18 24 26 27 30 33 56 57 62 63 "
 FAILURE=" 2 3 5 6 8 9 10 11 13 14 19 20 21 22 23 25 28 29 31 32 54 55 58 59 60 61 "
+KNOWN_BUGS=" 15 16 17 18 19 28 29 31 32 54 55 58 59 60 61 "
+
+cd x509paths
 
 test -d X509tests || tar xfz x509tests.tgz
+mkdir -p chains
+RET=0
 
 i=1
 while test -d X509tests/test$i; do
-    find X509tests/test$i -name *.crl -print0 |sort -r -z|xargs -n1 --null $CERTTOOL --crl-info --inder --infile > chain$i.pem  2>/dev/null
-    find X509tests/test$i -name E*.crt -print0 |sort -r -z|xargs -n1 --null $CERTTOOL --certificate-info --inder --infile >> chain$i.pem 2>/dev/null
+    find X509tests/test$i -name *.crl -print0 |sort -r -z|xargs -n1 --null $CERTTOOL --crl-info --inder --infile > chains/chain$i.pem  2>/dev/null
+    find X509tests/test$i -name E*.crt -print0 |sort -r -z|xargs -n1 --null $CERTTOOL --certificate-info --inder --infile >> chains/chain$i.pem 2>/dev/null
     if test "$i" -gt 1; then
-       find X509tests/test$i -name I*.crt -print0 |sort -r -z|xargs -n1 --null $CERTTOOL --certificate-info --inder --infile >> chain$i.pem 2>/dev/null
+       find X509tests/test$i -name I*.crt -print0 |sort -r -z|xargs -n1 --null $CERTTOOL --certificate-info --inder --infile >> chains/chain$i.pem 2>/dev/null
     fi
-    find X509tests/test$i -name T*.crt -print0 |sort -r -z|xargs -n1 --null $CERTTOOL --certificate-info --inder --infile >> chain$i.pem 2>/dev/null
-    $CERTTOOL -e --infile chain$i.pem > out 2>&1
+    find X509tests/test$i -name T*.crt -print0 |sort -r -z|xargs -n1 --null $CERTTOOL --certificate-info --inder --infile >> chains/chain$i.pem 2>/dev/null
+    $CERTTOOL -e --infile chains/chain$i.pem > out 2>&1
     rc=$?
     if test $rc != 0; then
        echo "Chain $i FATAL failure."
+       RET=1
     else
-       if echo "$SUCCESS" | grep " $i " > /dev/null 2>&1; then
+       if echo "$KNOWN_BUGS" | grep " $i " > /dev/null 2>&1; then
+               echo "Chain $i verification was skipped due to known bug."
+       elif echo "$SUCCESS" | grep " $i " > /dev/null 2>&1; then
            if grep 'Chain verification output:' out | grep -v 'Chain verification output: Verified\.$' > /dev/null 2>&1; then
                echo "Chain $i verification failure UNEXPECTED."
+               RET=1
            else
                echo "Chain $i verification success as expected."
            fi
@@ -52,6 +61,7 @@ while test -d X509tests/test$i; do
                echo "Chain $i verification failure as expected."
            else
                echo "Chain $i verification success UNEXPECTED. "
+               RET=1
            fi
        else
            echo "Chain $i unclassified."
@@ -60,3 +70,5 @@ while test -d X509tests/test$i; do
     i=`expr $i + 1`
 done
 rm -f out
+
+exit $RET
similarity index 95%
rename from tests/suite/testbig
rename to tests/suite/testcompat
index fc69fbd2bd3b0585dcd235dc966d401729d0dee9..5f632164cd92b14dbdc68829af8f2324a4fb7803 100755 (executable)
@@ -24,4 +24,4 @@ if ! test -x /usr/bin/openssl;then
   exit 77
 fi
 
-datefudge "2007-04-22" ./testbig-main
+datefudge "2007-04-22" ./testcompat-main
diff --git a/tests/suite/x509paths/.gitignore b/tests/suite/x509paths/.gitignore
new file mode 100644 (file)
index 0000000..06baabd
--- /dev/null
@@ -0,0 +1 @@
+chains
similarity index 88%
rename from tests/x509paths/README
rename to tests/suite/x509paths/README
index 85532f6065e4f4675ad19408ddd55b805aa69415..46450a09b8e5327cb9a43d12fed9f39dd5dbe260 100644 (file)
@@ -13,9 +13,6 @@ currently.
 See the PDF for information regarding the self tests.  Particular
 comments on individual tests below.  The 'XXX' marks real bugs.
 
-Chain 13-14,65: We probably should not fail fatally, although this is
-not a real problem.
-
 Chain 15-18: We should succeed, the reason we don't is that we use
 memcmp for DN comparisons.
 
@@ -31,4 +28,4 @@ Chain 31-32: The CRL is issued by a issuer without CRLSign
 real problem. This is easier to be supported now with the trust_list
 that can verify CRLs on addition.
 
-Chain 54-63: We don't check path length constraints properly. XXX
+Chain 54-55,58-61: We don't check path length constraints properly. XXX