tor-browser

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

ike.sh (1497B)


      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 # A Bourne shell script for running the NIST RNG Validation Suite
      8 #
      9 # Before you run the script, set your PATH, LD_LIBRARY_PATH, ... environment
     10 # variables appropriately so that the fipstest command and the NSPR and NSS
     11 # shared libraries/DLLs are on the search path.  Then run this script in the
     12 # directory where the REQUEST (.req) files reside.  The script generates the
     13 # RESPONSE (.rsp) files in the same directory.
     14 BASEDIR=${1-.}
     15 TESTDIR=${BASEDIR}/IKE
     16 COMMAND=${2-run}
     17 REQDIR=${TESTDIR}/req
     18 RSPDIR=${TESTDIR}/resp
     19 
     20 ike_requests="
     21 ikev1_dsa.req
     22 ikev1_psk.req
     23 ikev2.req
     24 "
     25 
     26 if [ ${COMMAND} = "verify" ]; then
     27    result=0
     28    for request in $ike_requests; do
     29 sh ./validate1.sh ${TESTDIR} $request
     30 last_result=$?
     31 result=`expr $result + $last_result`
     32    done
     33    exit $result
     34 fi
     35 
     36 test -d "${RSPDIR}" || mkdir "${RSPDIR}"
     37 
     38 request=ikev1_dsa.req
     39 response=`echo $request | sed -e "s/req/rsp/"`
     40 echo $request $response
     41 fipstest ikev1 ${REQDIR}/$request > ${RSPDIR}/$response
     42 request=ikev1_psk.req
     43 response=`echo $request | sed -e "s/req/rsp/"`
     44 echo $request $response
     45 fipstest ikev1-psk ${REQDIR}/$request > ${RSPDIR}/$response
     46 request=ikev2.req
     47 response=`echo $request | sed -e "s/req/rsp/"`
     48 echo $request $response
     49 fipstest ikev2 ${REQDIR}/$request > ${RSPDIR}/$response
     50 exit 0;