1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/nss/cmd/fipstest/sha.sh Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,50 @@ 1.4 +#!/bin/sh 1.5 +# This Source Code Form is subject to the terms of the Mozilla Public 1.6 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.8 + 1.9 +# 1.10 +# A Bourne shell script for running the NIST SHA Algorithm Validation Suite 1.11 +# 1.12 +# Before you run the script, set your PATH, LD_LIBRARY_PATH, ... environment 1.13 +# variables appropriately so that the fipstest command and the NSPR and NSS 1.14 +# shared libraries/DLLs are on the search path. Then run this script in the 1.15 +# directory where the REQUEST (.req) files reside. The script generates the 1.16 +# RESPONSE (.rsp) files in the same directory. 1.17 + 1.18 +sha_ShortMsg_requests=" 1.19 +SHA1ShortMsg.req 1.20 +SHA256ShortMsg.req 1.21 +SHA384ShortMsg.req 1.22 +SHA512ShortMsg.req 1.23 +" 1.24 + 1.25 +sha_LongMsg_requests=" 1.26 +SHA1LongMsg.req 1.27 +SHA256LongMsg.req 1.28 +SHA384LongMsg.req 1.29 +SHA512LongMsg.req 1.30 +" 1.31 + 1.32 +sha_Monte_requests=" 1.33 +SHA1Monte.req 1.34 +SHA256Monte.req 1.35 +SHA384Monte.req 1.36 +SHA512Monte.req 1.37 +" 1.38 +for request in $sha_ShortMsg_requests; do 1.39 + response=`echo $request | sed -e "s/req/rsp/"` 1.40 + echo $request $response 1.41 + fipstest sha $request > $response 1.42 +done 1.43 +for request in $sha_LongMsg_requests; do 1.44 + response=`echo $request | sed -e "s/req/rsp/"` 1.45 + echo $request $response 1.46 + fipstest sha $request > $response 1.47 +done 1.48 +for request in $sha_Monte_requests; do 1.49 + response=`echo $request | sed -e "s/req/rsp/"` 1.50 + echo $request $response 1.51 + fipstest sha $request > $response 1.52 +done 1.53 +