diff -r 000000000000 -r 6474c204b198 security/nss/tests/libpkix/pkix_tests/top/runTests.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/security/nss/tests/libpkix/pkix_tests/top/runTests.sh Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,517 @@ +#!/bin/sh +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# runTests.sh +# + + +LDAP='nss.red.iplanet.com:1389' +export LDAP +curdir=`pwd` +cd ../../common +. ./libpkix_init.sh > /dev/null +doPD=1 +doOCSP=1 +. ./libpkix_init_nist.sh +cd ${curdir} + +numtests=0 +passed=0 +testunit=TOP +doTop=1 +linkMStoreNistFiles="store1/TrustAnchorRootCRL.crl + store1/TwoCRLsCABadCRL.crl + store2/TwoCRLsCAGoodCRL.crl" + +if [ ! -z "${NIST_FILES_DIR}" ] ; then + if [ -d ${HOSTDIR}/rev_data/multiple_certstores ]; then + rm -fr ${HOSTDIR}/rev_data/multiple_certstores + fi + mkdir -p ${HOSTDIR}/rev_data/multiple_certstores + mkdir -p ${HOSTDIR}/rev_data/multiple_certstores/store1 + mkdir -p ${HOSTDIR}/rev_data/multiple_certstores/store2 + for i in ${linkMStoreNistFiles}; do + if [ -f ${HOSTDIR}/rev_data/multiple_certstores/$i ]; then + rm ${HOSTDIR}/rev_data/multiple_certstores/$i + fi + fname=`basename $i` + cp ${NIST_FILES_DIR}/${fname} ${HOSTDIR}/rev_data/multiple_certstores/$i + done +fi + +ocspFiles="goodcert.crt revokedcert.crt anchorcert.crt + secmod.db key3.db cert8.db" + +if [ ! -z ${doOCSPTest} ] ; then + if [ -d ${HOSTDIR}/ocsp ]; then + rm -fr ${HOSTDIR}/ocsp + fi + mkdir -p ${HOSTDIR}/ocsp + for i in ${ocspFiles}; do + cp $i ${HOSTDIR}/ocsp/$i + + done +fi + +########## +# main +########## + +ParseArgs $* + +Display "" +Display "# ENE = expect no error (validation should succeed)" +Display "# EE = expect error (validation should fail)" +Display "" + +LOGGING=1 +SOCKETTRACE=1 +export LOGGING SOCKETTRACE + +RunTests <