15 env USETOOLS
=no MAKEOBJDIRPREFIX
=/usr
/obj
/i386 sh
-c 'cd ../lib && \
17 su root -c "make includes"; \
19 su root -c "make install"'
20 env USETOOLS
=no MAKEOBJDIRPREFIX
=/usr
/obj
/i386 sh
-c 'cd ../netpgp && \
23 su root -c "make install"'
24 env USETOOLS
=no MAKEOBJDIRPREFIX
=/usr
/obj
/i386 sh
-c 'cd ../netpgpkeys && \
27 su root -c "make install"'
28 env USETOOLS
=no MAKEOBJDIRPREFIX
=/usr
/obj
/i386 sh
-c 'cd ../netpgpverify && \
31 su root -c "make install"'
35 echo "======> sign/verify 180938 file"
37 /usr
/bin
/netpgp
--sign a
38 /usr
/bin
/netpgp
--verify a.gpg
&& passed
=$
(expr $passed + 1)
39 echo "======> attempt to verify an unsigned file"
40 /usr
/bin
/netpgp
--verify a || passed
=$
(expr $passed + 1)
41 echo "======> encrypt/decrypt 10809 file"
42 cp src
/netpgp
/netpgp
.1 b
43 /usr
/bin
/netpgp
--encrypt b
44 /usr
/bin
/netpgp
--decrypt b.gpg
45 diff src
/netpgp
/netpgp
.1 b
&& passed
=$
(expr $passed + 1)
46 echo "======> encrypt/decrypt 180938 file"
48 /usr
/bin
/netpgp
--encrypt c
49 /usr
/bin
/netpgp
--decrypt c.gpg
50 diff configure c
&& passed
=$
(expr $passed + 1)
51 echo "======> encrypt/decrypt bigass file"
52 cat configure configure configure configure configure configure
> d
55 /usr
/bin
/netpgp
--encrypt d
56 /usr
/bin
/netpgp
--decrypt d.gpg
57 diff e d
&& passed
=$
(expr $passed + 1)
58 echo "======> sign/verify detached signature file"
59 cat configure configure configure configure configure configure
> f
60 /usr
/bin
/netpgp
--sign --detached f
62 /usr
/bin
/netpgp
--verify f.sig
&& passed
=$
(expr $passed + 1)
63 echo "======> cat signature - verified cat command"
64 /usr
/bin
/netpgp
--cat a.gpg
> a2
65 diff a a2
&& passed
=$
(expr $passed + 1)
66 echo "======> another cat signature - verified cat command"
67 /usr
/bin
/netpgp
--cat --output=a3 a.gpg
68 diff a a3
&& passed
=$
(expr $passed + 1)
69 echo "======> netpgp list-packets test"
70 /usr
/bin
/netpgp
--list-packets || passed
=$
(expr $passed + 1)
71 echo "======> version information"
72 /usr
/bin
/netpgp
--version
73 echo "======> netpgpverify file"
74 /usr
/bin
/netpgpverify a.gpg
&& passed
=$
(expr $passed + 1)
75 echo "======> attempt to verify an unsigned file"
76 /usr
/bin
/netpgpverify a || passed
=$
(expr $passed + 1)
77 echo "======> sign/verify detached signature file"
79 /usr
/bin
/netpgpverify f.sig
&& passed
=$
(expr $passed + 1)
80 echo "======> another verify signature - verified cat command"
81 /usr
/bin
/netpgpverify
--output=a3 a.gpg
82 diff a a3
&& passed
=$
(expr $passed + 1)
83 echo "======> list keys"
84 /usr
/bin
/netpgpkeys
--list-keys && passed
=$
(expr $passed + 1)
85 echo "======> version information"
86 /usr
/bin
/netpgpverify
--version
87 echo "======> find specific key information"
88 /usr
/bin
/netpgpkeys
--get-key c0596823 agc@netbsd.org
&& passed
=$
(expr $passed + 1)
89 echo "======> ascii armoured signature"
91 /usr
/bin
/netpgp
--sign --armor g
&& passed
=$
(expr $passed + 1)
92 echo "======> ascii armoured sig detection and verification"
93 /usr
/bin
/netpgp
--verify g.asc
&& passed
=$
(expr $passed + 1)
94 echo "======> ascii armoured signature of large file"
96 /usr
/bin
/netpgp
--sign --armor g
&& passed
=$
(expr $passed + 1)
97 echo "======> ascii armoured sig detection and verification of large file"
98 /usr
/bin
/netpgp
--verify g.asc
&& passed
=$
(expr $passed + 1)
99 echo "======> list ssh host RSA public key"
100 /usr
/bin
/netpgpkeys
--ssh-keys --sshkeyfile=/etc
/ssh
/ssh_host_rsa_key.pub
--list-keys && passed
=$
(expr $passed + 1)
101 echo "======> sign/verify file with ssh host keys"
103 sudo
/usr
/bin
/netpgp
--ssh-keys --sshkeyfile=/etc
/ssh
/ssh_host_rsa_key.pub
--sign a
105 /usr
/bin
/netpgp
--verify --ssh-keys --sshkeyfile=/etc
/ssh
/ssh_host_rsa_key.pub a.gpg
&& passed
=$
(expr $passed + 1)
106 echo "======> pipeline and memory encrypt/decrypt"
107 /usr
/bin
/netpgp
--encrypt < a |
/usr
/bin
/netpgp
--decrypt > a4
108 diff a a4
&& passed
=$
(expr $passed + 1)
109 echo "======> pipeline and memory sign/verify"
110 /usr
/bin
/netpgp
--sign < a |
/usr
/bin
/netpgp
--cat > a5
111 diff a a5
&& passed
=$
(expr $passed + 1)
112 rm -f a a.gpg b b.gpg c c.gpg d d.gpg e f f.sig g g.asc a2 a3 a4 a5
113 echo "Passed ${passed}/${total} tests"