4 echo crypto.sh using
${srcdir}
6 testdir
=${srcdir}/tests
12 # Only attempt OpenSSL-specific tests when compiled with the library.
14 if grep '^#define HAVE_LIBCRYPTO 1$' ${srcdir}/config.h
>/dev
/null
16 if ${testdir}/TESTonce esp1 ${testdir}/02-sunrise-sunset-esp.pcap ${testdir}/esp1.out
'-E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"'
18 passed
=`expr $passed + 1`
21 failed
=`expr $failed + 1`
25 if ${testdir}//TESTonce esp2 ${testdir}/08-sunrise-sunset-esp2.pcap ${testdir}/esp2.out
'-E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840,0xabcdabcd@192.0.1.1 3des-cbc-hmac96:0x434545464649494a4a4c4c4f4f5151525254545757584043"'
27 passed
=`expr $passed + 1`
30 failed
=`expr $failed + 1`
34 if ${testdir}/TESTonce esp3 ${testdir}/02-sunrise-sunset-esp.pcap ${testdir}/esp1.out
'-E "3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"'
36 passed
=`expr $passed + 1`
39 failed
=`expr $failed + 1`
43 # Reading the secret(s) from a file does not work with Capsicum.
44 if grep '^#define HAVE_CAPSICUM 1$' ${srcdir}/config.h
>/dev
/null
46 FORMAT
=' %-35s: TEST SKIPPED (compiled w/Capsicum)\n'
49 printf "$FORMAT" espudp1
50 printf "$FORMAT" ikev2pI2
51 printf "$FORMAT" isakmp4
53 if ${testdir}/TESTonce esp4 ${testdir}/08-sunrise-sunset-esp2.pcap ${testdir}/esp2.out
'-E "file esp-secrets.txt"'
55 passed
=`expr $passed + 1`
58 failed
=`expr $failed + 1`
62 if ${testdir}/TESTonce esp5 ${testdir}/08-sunrise-sunset-aes.pcap ${testdir}/esp5.out
'-E "file esp-secrets.txt"'
64 passed
=`expr $passed + 1`
67 failed
=`expr $failed + 1`
71 if ${testdir}/TESTonce espudp1 ${testdir}/espudp1.pcap ${testdir}/espudp1.out
'-nnnn -E "file esp-secrets.txt"'
73 passed
=`expr $passed + 1`
76 failed
=`expr $failed + 1`
80 if ${testdir}/TESTonce ikev2pI2 ${testdir}/ikev2pI2.pcap ${testdir}/ikev2pI2.out
'-E "file ikev2pI2-secrets.txt" -v -v -v -v'
82 passed
=`expr $passed + 1`
85 failed
=`expr $failed + 1`
89 if ${testdir}/TESTonce isakmp4 ${testdir}/isakmp4500.pcap ${testdir}/isakmp4.out
'-E "file esp-secrets.txt"'
91 passed
=`expr $passed + 1`
94 failed
=`expr $failed + 1`
99 if ${testdir}/TESTonce bgp-as-path-oobr-ssl ${testdir}/bgp-as-path-oobr.pcap ${testdir}/bgp-as-path-oobr-ssl.out
'-vvv -e'
101 passed
=`expr $passed + 1`
102 echo $passed >.passed
104 failed
=`expr $failed + 1`
105 echo $failed >.failed
108 if ${testdir}/TESTonce bgp-aigp-oobr-ssl ${testdir}/bgp-aigp-oobr.pcap ${testdir}/bgp-aigp-oobr-ssl.out
'-vvv -e'
110 passed
=`expr $passed + 1`
111 echo $passed >.passed
113 failed
=`expr $failed + 1`
114 echo $failed >.failed
117 FORMAT
=' %-35s: TEST SKIPPED (compiled w/OpenSSL)\n'
118 printf "$FORMAT" bgp-as-path-oobr-nossl
119 printf "$FORMAT" bgp-aigp-oobr-nossl
121 FORMAT
=' %-35s: TEST SKIPPED (compiled w/o OpenSSL)\n'
122 printf "$FORMAT" esp1
123 printf "$FORMAT" esp2
124 printf "$FORMAT" esp3
125 printf "$FORMAT" esp4
126 printf "$FORMAT" esp5
127 printf "$FORMAT" espudp1
128 printf "$FORMAT" ikev2pI2
129 printf "$FORMAT" isakmp4
130 printf "$FORMAT" bgp-as-path-oobr-ssl
131 printf "$FORMAT" bgp-aigp-oobr-ssl
132 if ${testdir}/TESTonce bgp-as-path-oobr-nossl ${testdir}/bgp-as-path-oobr.pcap ${testdir}/bgp-as-path-oobr-nossl.out
'-vvv -e'
134 passed
=`expr $passed + 1`
135 echo $passed >.passed
137 failed
=`expr $failed + 1`
138 echo $failed >.failed
141 if ${testdir}/TESTonce bgp-aigp-oobr-nossl ${testdir}/bgp-aigp-oobr.pcap ${testdir}/bgp-aigp-oobr-nossl.out
'-vvv -e'
143 passed
=`expr $passed + 1`
144 echo $passed >.passed
146 failed
=`expr $failed + 1`
147 echo $failed >.failed