]>
The Tcpdump Group git mirrors - tcpdump/blob - tests/crypto.sh
4 echo crypto.sh using
${srcdir} from $
(pwd)
6 testdir
=${srcdir}/tests
9 passedfile
=tests
/.passed
10 failedfile
=tests
/.failed
11 passed
=`cat ${passedfile}`
12 failed
=`cat ${failedfile}`
14 # Only attempt OpenSSL-specific tests when compiled with the library.
16 if grep '^#define HAVE_LIBCRYPTO 1$' ${srcdir}/config.h
>/dev
/null
18 if ${testdir}/TESTonce esp1 ${testdir}/02-sunrise-sunset-esp.pcap ${testdir}/esp1.out
'-E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"'
20 passed
=`expr $passed + 1`
21 echo $passed >${passedfile}
23 failed
=`expr $failed + 1`
24 echo $failed >${failedfile}
27 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"'
29 passed
=`expr $passed + 1`
30 echo $passed >${passedfile}
32 failed
=`expr $failed + 1`
33 echo $failed >${failedfile}
36 if ${testdir}/TESTonce esp3 ${testdir}/02-sunrise-sunset-esp.pcap ${testdir}/esp1.out
'-E "3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"'
38 passed
=`expr $passed + 1`
39 echo $passed >${passedfile}
41 failed
=`expr $failed + 1`
42 echo $failed >${failedfile}
45 # Reading the secret(s) from a file does not work with Capsicum.
46 if grep '^#define HAVE_CAPSICUM 1$' ${srcdir}/config.h
>/dev
/null
48 FORMAT
=' %-35s: TEST SKIPPED (compiled w/Capsicum)\n'
51 printf "$FORMAT" espudp1
52 printf "$FORMAT" ikev2pI2
53 printf "$FORMAT" isakmp4
55 if ${testdir}/TESTonce esp4 ${testdir}/08-sunrise-sunset-esp2.pcap ${testdir}/esp2.out '-E "file ${testdir}/esp-secrets.txt
"'
57 passed=`expr $passed + 1`
58 echo $passed >${passedfile}
60 failed=`expr $failed + 1`
61 echo $failed >${failedfile}
64 if ${testdir}/TESTonce esp5 ${testdir}/08-sunrise-sunset-aes.pcap ${testdir}/esp5.out '-E "file ${testdir}/esp-secrets.txt"'
66 passed=`expr $passed + 1`
67 echo $passed >${passedfile}
69 failed=`expr $failed + 1`
70 echo $failed >${failedfile}
73 if ${testdir}/TESTonce espudp1 ${testdir}/espudp1.pcap ${testdir}/espudp1.out '-nnnn -E "file ${testdir}/esp-secrets.txt"'
75 passed
=`expr $passed + 1`
76 echo $passed >${passedfile}
78 failed
=`expr $failed + 1`
79 echo $failed >${failedfile}
82 if ${testdir}/TESTonce ikev2pI2 ${testdir}/ikev2pI2.pcap ${testdir}/ikev2pI2.out '-E "file ${testdir}/ikev2pI2-secrets.txt
" -v -v -v -v'
84 passed=`expr $passed + 1`
85 echo $passed >${passedfile}
87 failed=`expr $failed + 1`
88 echo $failed >${failedfile}
91 if ${testdir}/TESTonce isakmp4 ${testdir}/isakmp4500.pcap ${testdir}/isakmp4.out '-E "file ${testdir}/esp-secrets.txt"'
93 passed=`expr $passed + 1`
94 echo $passed >${passedfile}
96 failed=`expr $failed + 1`
97 echo $failed >${failedfile}
101 if ${testdir}/TESTonce bgp-as-path-oobr-ssl ${testdir}/bgp-as-path-oobr.pcap ${testdir}/bgp-as-path-oobr-ssl.out '-vvv -e'
103 passed=`expr $passed + 1`
104 echo $passed >${passedfile}
106 failed=`expr $failed + 1`
107 echo $failed >${failedfile}
110 if ${testdir}/TESTonce bgp-aigp-oobr-ssl ${testdir}/bgp-aigp-oobr.pcap ${testdir}/bgp-aigp-oobr-ssl.out '-vvv -e'
112 passed=`expr $passed + 1`
113 echo $passed >${passedfile}
115 failed=`expr $failed + 1`
116 echo $failed >${failedfile}
119 FORMAT=' %-35s: TEST SKIPPED
(compiled w
/OpenSSL
)\n'
120 printf "$FORMAT" bgp-as-path-oobr-nossl
121 printf "$FORMAT" bgp-aigp-oobr-nossl
123 FORMAT=' %-35s: TEST SKIPPED
(compiled w
/o OpenSSL
)\n'
124 printf "$FORMAT" esp1
125 printf "$FORMAT" esp2
126 printf "$FORMAT" esp3
127 printf "$FORMAT" esp4
128 printf "$FORMAT" esp5
129 printf "$FORMAT" espudp1
130 printf "$FORMAT" ikev2pI2
131 printf "$FORMAT" isakmp4
132 printf "$FORMAT" bgp-as-path-oobr-ssl
133 printf "$FORMAT" bgp-aigp-oobr-ssl
134 if ${testdir}/TESTonce bgp-as-path-oobr-nossl ${testdir}/bgp-as-path-oobr.pcap ${testdir}/bgp-as-path-oobr-nossl.out '-vvv -e'
136 passed=`expr $passed + 1`
137 echo $passed >${passedfile}
139 failed=`expr $failed + 1`
140 echo $failed >${failedfile}
143 if ${testdir}/TESTonce bgp-aigp-oobr-nossl ${testdir}/bgp-aigp-oobr.pcap ${testdir}/bgp-aigp-oobr-nossl.out '-vvv -e'
145 passed=`expr $passed + 1`
146 echo $passed >${passedfile}
148 failed=`expr $failed + 1`
149 echo $failed >${failedfile}