Home | History | Annotate | Download | only in tests
      1 #!/bin/sh
      2 
      3 # Only attempt OpenSSL-specific tests when compiled with the library.
      4 
      5 if grep '^#define HAVE_LIBCRYPTO 1$' ../config.h >/dev/null
      6 then
      7 	./TESTonce esp1 02-sunrise-sunset-esp.pcap esp1.out '-t -E "0x12345678 (at] 192.1.2.45 3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"'
      8 	./TESTonce esp2 08-sunrise-sunset-esp2.pcap esp2.out '-t -E "0x12345678 (at] 192.1.2.45 3des-cbc-hmac96:0x43434545464649494a4a4c4c4f4f51515252545457575840,0xabcdabcd (at] 192.0.1.1 3des-cbc-hmac96:0x434545464649494a4a4c4c4f4f5151525254545757584043"'
      9 	./TESTonce esp3 02-sunrise-sunset-esp.pcap esp1.out '-t -E "3des-cbc-hmac96:0x4043434545464649494a4a4c4c4f4f515152525454575758"'
     10 	# Reading the secret(s) from a file does not work with Capsicum.
     11 	if grep '^#define HAVE_CAPSICUM 1$' ../config.h >/dev/null
     12 	then
     13 		FORMAT='    %-30s: TEST SKIPPED (compiled w/Capsicum)\n'
     14 		printf "$FORMAT" esp4
     15 		printf "$FORMAT" esp5
     16 		printf "$FORMAT" espudp1
     17 		printf "$FORMAT" ikev2pI2
     18 		printf "$FORMAT" isakmp4
     19 	else
     20 		./TESTonce esp4 08-sunrise-sunset-esp2.pcap esp2.out '-t -E "file esp-secrets.txt"'
     21 		./TESTonce esp5 08-sunrise-sunset-aes.pcap esp5.out '-t -E "file esp-secrets.txt"'
     22 		./TESTonce espudp1 espudp1.pcap espudp1.out '-nnnn -t -E "file esp-secrets.txt"'
     23 		./TESTonce ikev2pI2 ikev2pI2.pcap ikev2pI2.out '-t -E "file ikev2pI2-secrets.txt" -v -v -v -v'
     24 		./TESTonce isakmp4 isakmp4500.pcap isakmp4.out '-t -E "file esp-secrets.txt"'
     25 	fi
     26 else
     27 	FORMAT='    %-30s: TEST SKIPPED (compiled w/o OpenSSL)\n'
     28 	printf "$FORMAT" esp1
     29 	printf "$FORMAT" esp2
     30 	printf "$FORMAT" esp3
     31 	printf "$FORMAT" esp4
     32 	printf "$FORMAT" esp5
     33 	printf "$FORMAT" espudp1
     34 	printf "$FORMAT" ikev2pI2
     35 	printf "$FORMAT" isakmp4
     36 fi
     37