summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2016-05-19 11:00:42 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2016-05-19 11:00:42 +0200
commit2fc395eb9677ab8b0412b72b3451a557ceb802c3 (patch)
treee71e9e663712ecfbd484d7ab62f320e5312b2805
parent3b14b4a421bd0c409a084eaa1c10fdf90ccb1d20 (diff)
downloadgnutls-2fc395eb9677ab8b0412b72b3451a557ceb802c3.tar.gz
tests: priorities: account for the addition of CHACHA20-POLY1305
-rw-r--r--tests/priorities.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/tests/priorities.c b/tests/priorities.c
index 9255849b1d..008c162a09 100644
--- a/tests/priorities.c
+++ b/tests/priorities.c
@@ -32,14 +32,6 @@
#include "utils.h"
-#ifdef ENABLE_FIPS140
-void doit(void)
-{
- exit(77);
-}
-
-#else
-
static void
try_prio(const char *prio, unsigned expected_cs, unsigned expected_ciphers, unsigned line)
{
@@ -101,22 +93,25 @@ try_prio(const char *prio, unsigned expected_cs, unsigned expected_ciphers, unsi
void doit(void)
{
- const int normal = 54;
+ const int normal = 57;
const int null = 5;
const int sec128 = 50;
- try_prio("NORMAL", normal, 11, __LINE__);
- try_prio("NORMAL:-MAC-ALL:+MD5:+MAC-ALL", normal, 11, __LINE__);
- try_prio("NORMAL:+CIPHER-ALL", normal, 11, __LINE__); /* all (except null) */
+ try_prio("NORMAL", normal, 12, __LINE__);
+ try_prio("NORMAL:-MAC-ALL:+MD5:+MAC-ALL", normal, 12, __LINE__);
+#ifndef ENABLE_FIPS140
+ try_prio("NORMAL:+CIPHER-ALL", normal, 12, __LINE__); /* all (except null) */
try_prio("NORMAL:-CIPHER-ALL:+NULL", null, 1, __LINE__); /* null */
- try_prio("NORMAL:-CIPHER-ALL:+NULL:+CIPHER-ALL", normal + null, 12, __LINE__); /* should be null + all */
+ try_prio("NORMAL:-CIPHER-ALL:+NULL:+CIPHER-ALL", normal + null, 13, __LINE__); /* should be null + all */
try_prio("NORMAL:-CIPHER-ALL:+NULL:+CIPHER-ALL:-CIPHER-ALL:+AES-128-CBC", 8, 1, __LINE__); /* should be null + all */
- try_prio("PERFORMANCE", normal, 11, __LINE__);
+#endif
+ try_prio("PERFORMANCE", normal, 12, __LINE__);
try_prio("SECURE256", 19, 5, __LINE__);
try_prio("SECURE128", sec128, 10, __LINE__);
try_prio("SECURE128:+SECURE256", sec128, 10, __LINE__); /* should be the same as SECURE128 */
- try_prio("SECURE128:+SECURE256:+NORMAL", normal, 11, __LINE__); /* should be the same as NORMAL */
+ try_prio("SECURE128:+SECURE256:+NORMAL", normal, 12, __LINE__); /* should be the same as NORMAL */
try_prio("SUITEB192", 1, 1, __LINE__);
+ /* check legacy strings */
+ try_prio("NORMAL:+RSA-EXPORT:+ARCFOUR-40", normal, 12, __LINE__);
}
-#endif