From: Nikos Mavrogiannopoulos Date: Fri, 15 Apr 2011 07:47:09 +0000 (+0200) Subject: x509paths tests moved to suite/. X-Git-Tag: gnutls_2_99_1~32 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f8615a0e215346adb53a529642beadfacb68dd75;p=thirdparty%2Fgnutls.git x509paths tests moved to suite/. --- diff --git a/tests/suite/Makefile.am b/tests/suite/Makefile.am index 6c95f437f5..17a587eaa7 100644 --- a/tests/suite/Makefile.am +++ b/tests/suite/Makefile.am @@ -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 diff --git a/tests/x509paths/chain b/tests/suite/chain similarity index 77% rename from tests/x509paths/chain rename to tests/suite/chain index f581fecd43..ca3468ddbf 100755 --- a/tests/x509paths/chain +++ b/tests/suite/chain @@ -21,29 +21,38 @@ # 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 diff --git a/tests/suite/testbig b/tests/suite/testcompat similarity index 95% rename from tests/suite/testbig rename to tests/suite/testcompat index fc69fbd2bd..5f632164cd 100755 --- a/tests/suite/testbig +++ b/tests/suite/testcompat @@ -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/testbig-main b/tests/suite/testcompat-main similarity index 100% rename from tests/suite/testbig-main rename to tests/suite/testcompat-main diff --git a/tests/suite/x509paths/.gitignore b/tests/suite/x509paths/.gitignore new file mode 100644 index 0000000000..06baabd434 --- /dev/null +++ b/tests/suite/x509paths/.gitignore @@ -0,0 +1 @@ +chains diff --git a/tests/x509paths/README b/tests/suite/x509paths/README similarity index 88% rename from tests/x509paths/README rename to tests/suite/x509paths/README index 85532f6065..46450a09b8 100644 --- a/tests/x509paths/README +++ b/tests/suite/x509paths/README @@ -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 diff --git a/tests/x509paths/certpath1.07.zip b/tests/suite/x509paths/certpath1.07.zip similarity index 100% rename from tests/x509paths/certpath1.07.zip rename to tests/suite/x509paths/certpath1.07.zip diff --git a/tests/x509paths/x509tests.tgz b/tests/suite/x509paths/x509tests.tgz similarity index 100% rename from tests/x509paths/x509tests.tgz rename to tests/suite/x509paths/x509tests.tgz