Home | History | Annotate | Line # | Download | only in dist
tst revision 1.7
      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 ../bin && \
      8 	make cleandir ; \
      9 	make ; \
     10 	su root -c "make install"'
     11 
     12 passed=0
     13 total=9
     14 echo "======> sign/verify 180938 file"
     15 cp configure a
     16 /usr/bin/netpgp --sign a
     17 /usr/bin/netpgp --verify a.gpg && passed=$(expr $passed + 1)
     18 echo "======> attempt to verify an unsigned file"
     19 /usr/bin/netpgp --verify a || passed=$(expr $passed + 1)
     20 echo "======> encrypt/decrypt 10809 file"
     21 cp src/bin/netpgp.1 b
     22 /usr/bin/netpgp --encrypt b
     23 /usr/bin/netpgp --decrypt b.gpg
     24 diff src/bin/netpgp.1 b && passed=$(expr $passed + 1)
     25 echo "======> encrypt/decrypt 180938 file"
     26 cp configure c
     27 /usr/bin/netpgp --encrypt c
     28 /usr/bin/netpgp --decrypt c.gpg
     29 diff configure c && passed=$(expr $passed + 1)
     30 echo "======> encrypt/decrypt bigass file"
     31 cat configure configure configure configure configure configure > d
     32 ls -l d
     33 cp d e
     34 /usr/bin/netpgp --encrypt d
     35 /usr/bin/netpgp --decrypt d.gpg
     36 diff e d && passed=$(expr $passed + 1)
     37 echo "======> sign/verify detached signature file"
     38 cat configure configure configure configure configure configure > f
     39 /usr/bin/netpgp --sign --detached f
     40 ls -l f f.sig
     41 /usr/bin/netpgp --verify f.sig && passed=$(expr $passed + 1)
     42 echo "======> cat signature - verified cat command"
     43 /usr/bin/netpgp --cat a.gpg > a2
     44 diff a a2 && passed=$(expr $passed + 1)
     45 echo "======> another cat signature - verified cat command"
     46 /usr/bin/netpgp --cat --output=a3 a.gpg
     47 diff a a3 && passed=$(expr $passed + 1)
     48 echo "======> version information"
     49 /usr/bin/netpgp --version
     50 rm -f a a.gpg b b.gpg c c.gpg d d.gpg e f f.sig a2 a3
     51 echo "======> no list-packets file"
     52 /usr/bin/netpgp --list-packets || passed=$(expr $passed + 1)
     53 rm -f a a.gpg b b.gpg c c.gpg d d.gpg e f f.sig a2 a3
     54 echo "Passed ${passed}/${total} tests"
     55