add psk cipher suite tests

This commit is contained in:
toddouska 2012-08-07 17:01:59 -07:00
parent 8bfd6c0e7e
commit a7aaf4fcaf
3 changed files with 75 additions and 1 deletions

View File

@ -16,4 +16,7 @@ tests_unit_CFLAGS = -DNO_MAIN_DRIVER $(AM_CFLAGS) $(PTHREAD_CFLAGS)
tests_unit_LDADD = src/libcyassl.la $(PTHREAD_LIBS)
tests_unit_DEPENDENCIES = src/libcyassl.la
EXTRA_DIST += tests/unit.h
EXTRA_DIST += tests/test.conf tests/test-openssl.conf tests/test-hc128.conf
EXTRA_DIST += tests/test.conf \
tests/test-openssl.conf \
tests/test-hc128.conf \
tests/test-psk.conf

View File

@ -258,6 +258,17 @@ int SuiteTest(void)
}
#endif
#ifndef NO_PSK
/* add psk extra suites */
strcpy(argv0[1], "tests/test-psk.conf");
printf("starting psk extra cipher suite tests\n");
test_harness(&args);
if (args.return_code != 0) {
printf("error from script %d\n", args.return_code);
exit(EXIT_FAILURE);
}
#endif
printf(" End Cipher Suite Tests\n");
return args.return_code;

60
tests/test-psk.conf Normal file
View File

@ -0,0 +1,60 @@
# server TLSv1 PSK-AES128
-s
-v 1
-l PSK-AES128-CBC-SHA
# client TLSv1 PSK-AES128
-s
-v 1
-l PSK-AES128-CBC-SHA
# server TLSv1 PSK-AES256
-s
-v 1
-l PSK-AES256-CBC-SHA
# client TLSv1 PSK-AES256
-s
-v 1
-l PSK-AES256-CBC-SHA
# server TLSv1.1 PSK-AES128
-s
-v 2
-l PSK-AES128-CBC-SHA
# client TLSv1.1 PSK-AES128
-s
-v 2
-l PSK-AES128-CBC-SHA
# server TLSv1.1 PSK-AES256
-s
-v 2
-l PSK-AES256-CBC-SHA
# client TLSv1.1 PSK-AES256
-s
-v 2
-l PSK-AES256-CBC-SHA
# server TLSv1.2 PSK-AES128
-s
-v 3
-l PSK-AES128-CBC-SHA
# client TLSv1.2 PSK-AES128
-s
-v 3
-l PSK-AES128-CBC-SHA
# server TLSv1.2 PSK-AES256
-s
-v 3
-l PSK-AES256-CBC-SHA
# client TLSv1.2 PSK-AES256
-s
-v 3
-l PSK-AES256-CBC-SHA