diff options
| author | Denis Ovsienko <infrastation@yandex.ru> | 2014-02-17 00:22:37 +0400 |
|---|---|---|
| committer | Denis Ovsienko <infrastation@yandex.ru> | 2014-02-17 00:24:08 +0400 |
| commit | 9e2042ebe86c41d373930dbd89b56a6a2f06fcf0 (patch) | |
| tree | 3925b2ab81a65140105adf99f4f316b06b71a152 /tests | |
| parent | b80fdf7bbf03d10e90e04fe382a2b5605cfb6a36 (diff) | |
| download | tcpdump-9e2042ebe86c41d373930dbd89b56a6a2f06fcf0.tar.gz | |
make OpenSSL-specific tests conditional
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/TESTLIST | 9 | ||||
| -rwxr-xr-x | tests/crypto.sh | 23 |
2 files changed, 25 insertions, 7 deletions
diff --git a/tests/TESTLIST b/tests/TESTLIST index 6e54b8d8..0b402c28 100644 --- a/tests/TESTLIST +++ b/tests/TESTLIST @@ -25,12 +25,7 @@ eapon1 eapon1.pcap eapon1.out -t # ESP tests esp0 02-sunrise-sunset-esp.pcap esp0.out -t -n -esp1 02-sunrise-sunset-esp.pcap esp1.out -t -E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758" -esp2 08-sunrise-sunset-esp2.pcap esp2.out -t -E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840,0xabcdabcd@192.0.1.1 3des-cbc-hmac96:0x434545464649494a4a4c4c4f4f5151525254545757584043" -esp3 02-sunrise-sunset-esp.pcap esp1.out -t -E "3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758" -esp4 08-sunrise-sunset-esp2.pcap esp2.out -t -E "file esp-secrets.txt" -esp5 08-sunrise-sunset-aes.pcap esp5.out -t -E "file esp-secrets.txt" -espudp1 espudp1.pcap espudp1.out -nnnn -t -E "file esp-secrets.txt" +# more ESP tests in crypto.sh # ISAKMP tests isakmp1 isakmp-delete-segfault.pcap isakmp1.out -t @@ -52,7 +47,7 @@ ospf-gmpls ospf-gmpls.pcap ospf-gmpls.out -t -v ikev2four ikev2four.pcap ikev2four.out -t -v ikev2fourv ikev2four.pcap ikev2fourv.out -t -v -v -v ikev2fourv4 ikev2four.pcap ikev2fourv4.out -t -v -v -v -v -ikev2pI2 ikev2pI2.pcap ikev2pI2.out -t -E "file ikev2pI2-secrets.txt" -v -v -v -v +# ikev2pI2 test in crypto.sh # IETF ROLL RPL packets dio01 rpl-dio.pcap rpl-dio.out -t -v diff --git a/tests/crypto.sh b/tests/crypto.sh new file mode 100755 index 00000000..93d1adc9 --- /dev/null +++ b/tests/crypto.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# Only attempt OpenSSL-specific tests when compiled with the library. + +if grep '^#define HAVE_LIBCRYPTO 1$' ../config.h >/dev/null +then + ./TESTonce esp1 02-sunrise-sunset-esp.pcap esp1.out '-t -E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"' + ./TESTonce esp2 08-sunrise-sunset-esp2.pcap esp2.out '-t -E "0x12345678@192.1.2.45 3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840,0xabcdabcd@192.0.1.1 3des-cbc-hmac96:0x434545464649494a4a4c4c4f4f5151525254545757584043"' + ./TESTonce esp3 02-sunrise-sunset-esp.pcap esp1.out '-t -E "3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"' + ./TESTonce esp4 08-sunrise-sunset-esp2.pcap esp2.out '-t -E "file esp-secrets.txt"' + ./TESTonce esp5 08-sunrise-sunset-aes.pcap esp5.out '-t -E "file esp-secrets.txt"' + ./TESTonce espudp1 espudp1.pcap espudp1.out '-nnnn -t -E "file esp-secrets.txt"' + ./TESTonce ikev2pI2 ikev2pI2.pcap ikev2pI2.out '-t -E "file ikev2pI2-secrets.txt" -v -v -v -v' +else + FORMAT=' %-30s: TEST SKIPPED (compiled w/o OpenSSL)\n' + printf "$FORMAT" esp1 + printf "$FORMAT" esp2 + printf "$FORMAT" esp3 + printf "$FORMAT" esp4 + printf "$FORMAT" esp5 + printf "$FORMAT" espudp1 + printf "$FORMAT" ikev2pI2 +fi |
