summaryrefslogtreecommitdiff
path: root/tests/mini-record.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2015-04-07 10:42:36 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2015-04-07 10:42:36 +0200
commit75e2d8aa66b1cfd04511ddbfbda7a9a0fd45ac3d (patch)
tree8dcef8f57b5cf83fd796712933a020367394efaf /tests/mini-record.c
parentf1ff2ffbc8fb5fa9c89b09519e3951fab55d7af1 (diff)
downloadgnutls-75e2d8aa66b1cfd04511ddbfbda7a9a0fd45ac3d.tar.gz
tests: added CCM and CCM_8 into ciphersuite tests
Diffstat (limited to 'tests/mini-record.c')
-rw-r--r--tests/mini-record.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/mini-record.c b/tests/mini-record.c
index c85947167c..aae6fa6b68 100644
--- a/tests/mini-record.c
+++ b/tests/mini-record.c
@@ -181,7 +181,11 @@ static void client(int fd, const char *prio)
gnutls_dtls_set_mtu(session, 1500);
/* Use default priorities */
- gnutls_priority_set_direct(session, prio, NULL);
+ ret = gnutls_priority_set_direct(session, prio, NULL);
+ if (ret < 0) {
+ fail("error in priority '%s': %s\n", prio, gnutls_strerror(ret));
+ exit(1);
+ }
/* put the anonymous credentials to the current session
*/
@@ -286,7 +290,11 @@ static void server(int fd, const char *prio)
/* avoid calling all the priority functions, since the defaults
* are adequate.
*/
- gnutls_priority_set_direct(session, prio, NULL);
+ ret = gnutls_priority_set_direct(session, prio, NULL);
+ if (ret < 0) {
+ fail("error in priority '%s': %s\n", prio, gnutls_strerror(ret));
+ exit(1);
+ }
gnutls_credentials_set(session, GNUTLS_CRD_ANON, anoncred);
gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, x509_cred);
@@ -381,6 +389,8 @@ static void start(const char *prio)
#define AES_CBC "NONE:+VERS-DTLS1.0:-CIPHER-ALL:+AES-128-CBC:+SHA1:+SIGN-ALL:+COMP-ALL:+ANON-ECDH:+CURVE-ALL"
#define AES_CBC_SHA256 "NONE:+VERS-DTLS1.0:-CIPHER-ALL:+RSA:+AES-128-CBC:+AES-256-CBC:+SHA256:+SIGN-ALL:+COMP-ALL:+ANON-ECDH:+CURVE-ALL"
#define AES_GCM "NONE:+VERS-DTLS1.2:-CIPHER-ALL:+RSA:+AES-128-GCM:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+ANON-ECDH:+CURVE-ALL"
+#define AES_CCM "NONE:+VERS-DTLS1.2:-CIPHER-ALL:+RSA:+AES-128-CCM:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+ANON-ECDH:+CURVE-ALL"
+#define AES_CCM_8 "NONE:+VERS-DTLS1.2:-CIPHER-ALL:+RSA:+AES-128-CCM-8:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+ANON-ECDH:+CURVE-ALL"
#define CHACHA_POLY1305 "NONE:+VERS-DTLS1.2:-CIPHER-ALL:+RSA:+CHACHA20-POLY1305:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+ECDHE-RSA:+CURVE-ALL"
static void ch_handler(int sig)
@@ -406,6 +416,8 @@ void doit(void)
start(AES_CBC);
start(AES_CBC_SHA256);
start(AES_GCM);
+ start(AES_CCM);
+ start(AES_CCM_8);
#ifndef ENABLE_FIPS140
start(CHACHA_POLY1305);
#endif