nss: import at 3.0.1 beta 1
[mozilla-nss.git] / security / nss / cmd / fipstest / sha.sh
blob685a41b004c8673cb1cace1efcc8de25e299a9b7
1 #!/bin/sh
3 # A Bourne shell script for running the NIST SHA Algorithm Validation Suite
5 # Before you run the script, set your PATH, LD_LIBRARY_PATH, ... environment
6 # variables appropriately so that the fipstest command and the NSPR and NSS
7 # shared libraries/DLLs are on the search path. Then run this script in the
8 # directory where the REQUEST (.req) files reside. The script generates the
9 # RESPONSE (.rsp) files in the same directory.
11 sha_ShortMsg_requests="
12 SHA1ShortMsg.req
13 SHA256ShortMsg.req
14 SHA384ShortMsg.req
15 SHA512ShortMsg.req
18 sha_LongMsg_requests="
19 SHA1LongMsg.req
20 SHA256LongMsg.req
21 SHA384LongMsg.req
22 SHA512LongMsg.req
25 sha_Monte_requests="
26 SHA1Monte.req
27 SHA256Monte.req
28 SHA384Monte.req
29 SHA512Monte.req
31 for request in $sha_ShortMsg_requests; do
32 response=`echo $request | sed -e "s/req/rsp/"`
33 echo $request $response
34 fipstest sha $request > $response
35 done
36 for request in $sha_LongMsg_requests; do
37 response=`echo $request | sed -e "s/req/rsp/"`
38 echo $request $response
39 fipstest sha $request > $response
40 done
41 for request in $sha_Monte_requests; do
42 response=`echo $request | sed -e "s/req/rsp/"`
43 echo $request $response
44 fipstest sha $request > $response
45 done