tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

runPLTests.sh (2426B)


      1 #!/bin/sh
      2 # 
      3 # This Source Code Form is subject to the terms of the Mozilla Public
      4 # License, v. 2.0. If a copy of the MPL was not distributed with this
      5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
      6 #
      7 # runPLTests.sh
      8 #
      9 
     10 curdir=`pwd`
     11 cd ../../common
     12 . ./libpkix_init.sh > /dev/null
     13 doPD=1
     14 . ./libpkix_init_nist.sh
     15 cd ${curdir}
     16 
     17 numtests=0
     18 passed=0
     19 testunit=PKI
     20 doPki=1
     21 
     22 ### setup NIST files need to link in
     23 linkPkiNistFiles="InvalidDNnameConstraintsTest3EE.crt 
     24        InvalidonlySomeReasonsTest21EE.crt 
     25        indirectCRLCA3cRLIssuerCRL.crl  
     26        nameConstraintsDN3subCA2Cert.crt 
     27        nameConstraintsDN4CACert.crt 
     28        nameConstraintsDN5CACert.crt 
     29        onlyContainsAttributeCertsCACRL.crl 
     30        onlyContainsCACertsCACRL.crl 
     31        onlyContainsUserCertsCACRL.crl 
     32        onlySomeReasonsCA3compromiseCRL.crl
     33        requireExplicitPolicy2CACert.crt 
     34        inhibitPolicyMapping5CACert.crt 
     35        inhibitAnyPolicy5CACert.crt 
     36        inhibitAnyPolicy0CACert.crt 
     37        P1Mapping1to234CACert.crt 
     38        UserNoticeQualifierTest15EE.crt 
     39        UserNoticeQualifierTest16EE.crt 
     40        UserNoticeQualifierTest17EE.crt 
     41        UserNoticeQualifierTest18EE.crt 
     42        CPSPointerQualifierTest20EE.crt"
     43 
     44 if [ -n "${NIST_FILES_DIR}" ]; then
     45    if [ ! -d ${HOSTDIR}/rev_data/local ]; then
     46        mkdir -p ${HOSTDIR}/rev_data/local
     47    fi
     48 
     49    for i in ${linkPkiNistFiles}; do
     50        if [ -f ${HOSTDIR}/rev_data/local/$i ]; then
     51            rm ${HOSTDIR}/rev_data/local/$i
     52        fi
     53        cp ${NIST_FILES_DIR}/$i ${HOSTDIR}/rev_data/local/$i
     54    done
     55 fi
     56 
     57 ##########
     58 # main
     59 #########
     60 
     61 TZ=US/Eastern
     62 
     63 ParseArgs $*
     64 
     65 RunTests <<EOF
     66 pkixutil test_cert NIST-Test-Files-Used ../../certs ${HOSTDIR}/rev_data/local
     67 pkixutil test_crl NIST-Test-Files-Used ../../certs
     68 pkixutil test_x500name
     69 pkixutil test_generalname
     70 pkixutil test_date NIST-Test-Files-Used
     71 pkixutil test_crlentry ../../certs
     72 pkixutil test_nameconstraints NIST-Test-Files-Used rev_data/local ${HOSTDIR}
     73 pkixutil test_authorityinfoaccess NIST-PDTest ${NIST_PDTEST} certs/BasicLDAPURIPathDiscoveryOU1EE1.crt certs/BasicHTTPURITrustAnchorRootCert.crt
     74 pkixutil test_subjectinfoaccess NIST-PDTest ${NIST_PDTEST} certs/BasicHTTPURITrustAnchorRootCert.crt certs/BasicLDAPURIPathDiscoveryOU1EE1.crt
     75 EOF
     76 
     77 totalErrors=$?
     78 html_msg ${totalErrors} 0 "&nbsp;&nbsp;&nbsp;${testunit}: passed ${passed} of ${numtests} tests"
     79 exit ${totalErrors}