diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2015-04-07 22:21:45 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2015-04-07 23:22:43 +0200 |
commit | 4618dccb925c4dc7efb17354b34c8f37d1dbb1e5 (patch) | |
tree | f0c8153abf913478c595287cac5f0e69623a12ef | |
parent | 306ae7bb2ba3fa854c39a8964d791eebe19f0f38 (diff) | |
download | gnutls-4618dccb925c4dc7efb17354b34c8f37d1dbb1e5.tar.gz |
gnutls-cli-debug: test for AES-CCM
-rw-r--r-- | src/cli-debug.c | 4 | ||||
-rw-r--r-- | src/tests.c | 32 | ||||
-rw-r--r-- | src/tests.h | 2 |
3 files changed, 38 insertions, 0 deletions
diff --git a/src/cli-debug.c b/src/cli-debug.c index 8379b4d3e1..90d1b2a112 100644 --- a/src/cli-debug.c +++ b/src/cli-debug.c @@ -151,6 +151,10 @@ static const TLS_TEST tls_tests[] = { "N/A"}, {"for AES-128-GCM cipher (RFC5288) support", test_aes_gcm, "yes", "no", "dunno"}, + {"for AES-128-CCM cipher (RFC6655) support", test_aes_ccm, "yes", "no", + "dunno"}, + {"for AES-128-CCM-8 cipher (RFC6655) support", test_aes_ccm_8, "yes", "no", + "dunno"}, {"for AES-128-CBC cipher (RFC3268) support", test_aes, "yes", "no", "dunno"}, {"for CAMELLIA-128-GCM cipher (RFC6367) support", test_camellia_gcm, "yes", "no", diff --git a/src/tests.c b/src/tests.c index e2283fca93..3848e7332f 100644 --- a/src/tests.c +++ b/src/tests.c @@ -552,6 +552,38 @@ test_code_t test_aes_gcm(gnutls_session_t session) return ret; } +test_code_t test_aes_ccm(gnutls_session_t session) +{ + int ret; + + sprintf(prio_str, INIT_STR + "+AES-128-CCM:+AES-256-CCM:+AEAD:" ALL_COMP ":" + ALL_CERTTYPES ":%s:" ALL_MACS ":" ALL_KX ":%s", + protocol_all_str, rest); + _gnutls_priority_set_direct(session, prio_str); + + gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, xcred); + + ret = do_handshake(session); + return ret; +} + +test_code_t test_aes_ccm_8(gnutls_session_t session) +{ + int ret; + + sprintf(prio_str, INIT_STR + "+AES-128-CCM-8:+AES-256-CCM-8:+AEAD:" ALL_COMP ":" + ALL_CERTTYPES ":%s:" ALL_MACS ":" ALL_KX ":%s", + protocol_all_str, rest); + _gnutls_priority_set_direct(session, prio_str); + + gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, xcred); + + ret = do_handshake(session); + return ret; +} + test_code_t test_camellia_cbc(gnutls_session_t session) { int ret; diff --git a/src/tests.h b/src/tests.h index 335292957b..6631d69868 100644 --- a/src/tests.h +++ b/src/tests.h @@ -71,4 +71,6 @@ int _test_srp_username_callback(gnutls_session_t session, test_code_t test_ecdhe_curve(gnutls_session_t session); test_code_t test_ecdhe(gnutls_session_t session); test_code_t test_aes_gcm(gnutls_session_t session); +test_code_t test_aes_ccm(gnutls_session_t session); +test_code_t test_aes_ccm_8(gnutls_session_t session); test_code_t test_sha256(gnutls_session_t session); |