]> git.saurik.com Git - apple/security.git/blob - SecurityTests/clxutils/cmstool/testSubjects/vfyCms
Security-57031.1.35.tar.gz
[apple/security.git] / SecurityTests / clxutils / cmstool / testSubjects / vfyCms
1 #! /bin/csh -f
2 #
3 # run CMS regression tests.
4 #
5 set BUILD_DIR=$LOCAL_BUILD_DIR
6 set QUIET=
7 while ( $#argv > 0 )
8 switch ( "$argv[1]" )
9 case q:
10 set QUIET = -q
11 shift
12 breaksw
13 default:
14 echo Usage: vfyCms \[q\(uiet\)\]
15 exit(1)
16 endsw
17 end
18 #
19 # signed1.cms is ptext1 wrapped in a signedData
20 #
21 set TMP_PTEXT=/tmp/ptext_tmp
22 $LOCAL_BUILD_DIR/cmstool parse -i signed1.cms -o $TMP_PTEXT -v sign $QUIET || exit(1)
23 cmp ptext1.txt $TMP_PTEXT
24 if ($status != 0) then
25 echo ### Data miscompare: plaintext signed1.cms recovered $TMP_PTEXT
26 exit(1)
27 endif