Home | History | Annotate | Line # | Download | only in dist
tst revision 1.8
      1 #! /bin/sh
      2 
      3 env USETOOLS=no MAKEOBJDIRPREFIX=/usr/obj/i386 sh -c 'cd ../lib && \
      4 	make cleandir ; \
      5 	make ; \
      6 	su root -c "make install"'
      7 env USETOOLS=no MAKEOBJDIRPREFIX=/usr/obj/i386 sh -c 'cd ../netpgp && \
      8 	make cleandir ; \
      9 	make ; \
     10 	su root -c "make install"'
     11 env USETOOLS=no MAKEOBJDIRPREFIX=/usr/obj/i386 sh -c 'cd ../netpgpverify && \
     12 	make cleandir ; \
     13 	make ; \
     14 	su root -c "make install"'
     15 
     16 passed=0
     17 total=13
     18 echo "======> sign/verify 180938 file"
     19 cp configure a
     20 /usr/bin/netpgp --sign a
     21 /usr/bin/netpgp --verify a.gpg && passed=$(expr $passed + 1)
     22 echo "======> attempt to verify an unsigned file"
     23 /usr/bin/netpgp --verify a || passed=$(expr $passed + 1)
     24 echo "======> encrypt/decrypt 10809 file"
     25 cp src/bin/netpgp.1 b
     26 /usr/bin/netpgp --encrypt b
     27 /usr/bin/netpgp --decrypt b.gpg
     28 diff src/bin/netpgp.1 b && passed=$(expr $passed + 1)
     29 echo "======> encrypt/decrypt 180938 file"
     30 cp configure c
     31 /usr/bin/netpgp --encrypt c
     32 /usr/bin/netpgp --decrypt c.gpg
     33 diff configure c && passed=$(expr $passed + 1)
     34 echo "======> encrypt/decrypt bigass file"
     35 cat configure configure configure configure configure configure > d
     36 ls -l d
     37 cp d e
     38 /usr/bin/netpgp --encrypt d
     39 /usr/bin/netpgp --decrypt d.gpg
     40 diff e d && passed=$(expr $passed + 1)
     41 echo "======> sign/verify detached signature file"
     42 cat configure configure configure configure configure configure > f
     43 /usr/bin/netpgp --sign --detached f
     44 ls -l f f.sig
     45 /usr/bin/netpgp --verify f.sig && passed=$(expr $passed + 1)
     46 echo "======> cat signature - verified cat command"
     47 /usr/bin/netpgp --cat a.gpg > a2
     48 diff a a2 && passed=$(expr $passed + 1)
     49 echo "======> another cat signature - verified cat command"
     50 /usr/bin/netpgp --cat --output=a3 a.gpg
     51 diff a a3 && passed=$(expr $passed + 1)
     52 echo "======> netpgp list-packets test"
     53 /usr/bin/netpgp --list-packets || passed=$(expr $passed + 1)
     54 echo "======> version information"
     55 /usr/bin/netpgp --version
     56 echo "======> netpgpverify file"
     57 /usr/bin/netpgpverify a.gpg && passed=$(expr $passed + 1)
     58 echo "======> attempt to verify an unsigned file"
     59 /usr/bin/netpgpverify a || passed=$(expr $passed + 1)
     60 echo "======> sign/verify detached signature file"
     61 ls -l f f.sig
     62 /usr/bin/netpgpverify f.sig && passed=$(expr $passed + 1)
     63 echo "======> another verify signature - verified cat command"
     64 /usr/bin/netpgpverify --output=a3 a.gpg
     65 diff a a3 && passed=$(expr $passed + 1)
     66 echo "======> version information"
     67 /usr/bin/netpgpverify --version
     68 rm -f a a.gpg b b.gpg c c.gpg d d.gpg e f f.sig a2 a3
     69 echo "======> no list-packets file"
     70 /usr/bin/netpgp --list-packets || passed=$(expr $passed + 1)
     71 rm -f a a.gpg b b.gpg c c.gpg d d.gpg e f f.sig a2 a3
     72 echo "Passed ${passed}/${total} tests"
     73