]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
gnutls-cli-debug: test for AES-CCM
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 7 Apr 2015 20:21:45 +0000 (22:21 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Tue, 7 Apr 2015 21:22:43 +0000 (23:22 +0200)
src/cli-debug.c
src/tests.c
src/tests.h

index 8379b4d3e100ca3e65191962febc487a76a2e8b9..90d1b2a112592dbe39355cf5163618c433babace 100644 (file)
@@ -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",
index e2283fca936be6c43f2a4e558555a1a34fff2008..3848e7332f96d071263258d1e1ccf0c29f1727ce 100644 (file)
@@ -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;
index 335292957bfd80266dda2d1cf63bb44629e7554f..6631d698686d35c7a2e278e370ace96a18fd6196 100644 (file)
@@ -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);