4 : echo crypto.sh using
${srcdir} from
`pwd`
9 testdir
=${srcdir}/tests
12 passedfile
=tests
/.passed
13 failedfile
=tests
/.failed
14 passed
=`cat ${passedfile}`
15 failed
=`cat ${failedfile}`
17 # Only attempt OpenSSL-specific tests when compiled with the library.
19 if grep '^#define HAVE_LIBCRYPTO 1$' config.h
>/dev
/null
21 if ${testdir}/TESTonce esp1 ${testdir}/02-sunrise-sunset-esp.pcap ${testdir}/esp1.out
'-E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"'
23 passed
=`expr $passed + 1`
24 echo $passed >${passedfile}
26 failed
=`expr $failed + 1`
27 echo $failed >${failedfile}
30 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"'
32 passed
=`expr $passed + 1`
33 echo $passed >${passedfile}
35 failed
=`expr $failed + 1`
36 echo $failed >${failedfile}
39 if ${testdir}/TESTonce esp3 ${testdir}/02-sunrise-sunset-esp.pcap ${testdir}/esp1.out
'-E "3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"'
41 passed
=`expr $passed + 1`
42 echo $passed >${passedfile}
44 failed
=`expr $failed + 1`
45 echo $failed >${failedfile}
48 # Reading the secret(s) from a file does not work with Capsicum.
49 if grep '^#define HAVE_CAPSICUM 1$' config.h
>/dev
/null
51 FORMAT
=' %-35s: TEST SKIPPED (compiled w/Capsicum)\n'
54 printf "$FORMAT" espudp1
55 printf "$FORMAT" ikev2pI2
56 printf "$FORMAT" isakmp4
58 if ${testdir}/TESTonce esp4 ${testdir}/08-sunrise-sunset-esp2.pcap ${testdir}/esp4.out '-E "file '${testdir}'/esp-secrets.txt"'
60 passed
=`expr $passed + 1`
61 echo $passed >${passedfile}
63 failed
=`expr $failed + 1`
64 echo $failed >${failedfile}
67 if ${testdir}/TESTonce esp5 ${testdir}/08-sunrise-sunset-aes.pcap ${testdir}/esp5.out '-E "file '${testdir}'/esp-secrets.txt"'
69 passed
=`expr $passed + 1`
70 echo $passed >${passedfile}
72 failed
=`expr $failed + 1`
73 echo $failed >${failedfile}
76 if ${testdir}/TESTonce espudp1 ${testdir}/espudp1.pcap ${testdir}/espudp1.out '-nnnn -E "file '${testdir}'/esp-secrets.txt"'
78 passed
=`expr $passed + 1`
79 echo $passed >${passedfile}
81 failed
=`expr $failed + 1`
82 echo $failed >${failedfile}
85 if ${testdir}/TESTonce ikev2pI2 ${testdir}/ikev2pI2.pcap ${testdir}/ikev2pI2.out '-E "file '${testdir}'/ikev2pI2-secrets.txt" -v -v -v -v'
87 passed
=`expr $passed + 1`
88 echo $passed >${passedfile}
90 failed
=`expr $failed + 1`
91 echo $failed >${failedfile}
94 if ${testdir}/TESTonce isakmp4 ${testdir}/isakmp4500.pcap ${testdir}/isakmp4.out '-E "file '${testdir}'/esp-secrets.txt"'
96 passed
=`expr $passed + 1`
97 echo $passed >${passedfile}
99 failed
=`expr $failed + 1`
100 echo $failed >${failedfile}
104 if ${testdir}/TESTonce bgp-as-path-oobr-ssl ${testdir}/bgp-as-path-oobr.pcap ${testdir}/bgp-as-path-oobr-ssl.out
'-vvv -e'
106 passed
=`expr $passed + 1`
107 echo $passed >${passedfile}
109 failed
=`expr $failed + 1`
110 echo $failed >${failedfile}
113 if ${testdir}/TESTonce bgp-aigp-oobr-ssl ${testdir}/bgp-aigp-oobr.pcap ${testdir}/bgp-aigp-oobr-ssl.out
'-vvv -e'
115 passed
=`expr $passed + 1`
116 echo $passed >${passedfile}
118 failed
=`expr $failed + 1`
119 echo $failed >${failedfile}
122 FORMAT
=' %-35s: TEST SKIPPED (compiled w/OpenSSL)\n'
123 printf "$FORMAT" bgp-as-path-oobr-nossl
124 printf "$FORMAT" bgp-aigp-oobr-nossl
126 FORMAT
=' %-35s: TEST SKIPPED (compiled w/o OpenSSL)\n'
127 printf "$FORMAT" esp1
128 printf "$FORMAT" esp2
129 printf "$FORMAT" esp3
130 printf "$FORMAT" esp4
131 printf "$FORMAT" esp5
132 printf "$FORMAT" espudp1
133 printf "$FORMAT" ikev2pI2
134 printf "$FORMAT" isakmp4
135 printf "$FORMAT" bgp-as-path-oobr-ssl
136 printf "$FORMAT" bgp-aigp-oobr-ssl
137 if ${testdir}/TESTonce bgp-as-path-oobr-nossl ${testdir}/bgp-as-path-oobr.pcap ${testdir}/bgp-as-path-oobr-nossl.out
'-vvv -e'
139 passed
=`expr $passed + 1`
140 echo $passed >${passedfile}
142 failed
=`expr $failed + 1`
143 echo $failed >${failedfile}
146 if ${testdir}/TESTonce bgp-aigp-oobr-nossl ${testdir}/bgp-aigp-oobr.pcap ${testdir}/bgp-aigp-oobr-nossl.out
'-vvv -e'
148 passed
=`expr $passed + 1`
149 echo $passed >${passedfile}
151 failed
=`expr $failed + 1`
152 echo $failed >${failedfile}