From a7aaf4fcaf04f4c3f3bccb7f8a2f1f81e2a9e33e Mon Sep 17 00:00:00 2001 From: toddouska Date: Tue, 7 Aug 2012 17:01:59 -0700 Subject: [PATCH] add psk cipher suite tests --- tests/include.am | 5 +++- tests/suites.c | 11 +++++++++ tests/test-psk.conf | 60 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 tests/test-psk.conf diff --git a/tests/include.am b/tests/include.am index 9cd40bd6c..9c793239b 100644 --- a/tests/include.am +++ b/tests/include.am @@ -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 diff --git a/tests/suites.c b/tests/suites.c index 34dea9e80..252b9e626 100644 --- a/tests/suites.c +++ b/tests/suites.c @@ -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; diff --git a/tests/test-psk.conf b/tests/test-psk.conf new file mode 100644 index 000000000..ca4b918fd --- /dev/null +++ b/tests/test-psk.conf @@ -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 +