summaryrefslogtreecommitdiff
path: root/src/tests.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2016-04-24 10:54:54 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2016-04-24 14:06:56 +0200
commit4d4a342b0577748d49dc1a36d4c507b378af9d62 (patch)
treeb969ffbc4d169e8152db623ff15fbbfa5cfebe0f /src/tests.c
parent7d643a56e9aa6365c5fd1e18e4d9b8b8633fb430 (diff)
downloadgnutls-4d4a342b0577748d49dc1a36d4c507b378af9d62.tar.gz
gnutls-cli-debug: added CHACHA20-POLY1305 detection
Diffstat (limited to 'src/tests.c')
-rw-r--r--src/tests.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/src/tests.c b/src/tests.c
index 25c7d5a383..fe89372f7d 100644
--- a/src/tests.c
+++ b/src/tests.c
@@ -116,7 +116,7 @@ char prio_str[512] = "";
#define ALL_CIPHERS "+AES-128-GCM:+CAMELLIA-128-GCM:+AES-128-CBC:+CAMELLIA-128-CBC:+3DES-CBC:+ARCFOUR-128"
#define BLOCK_CIPHERS "+3DES-CBC:+AES-128-CBC:+CAMELLIA-128-CBC"
#define ALL_COMP "+COMP-NULL"
-#define ALL_MACS "+SHA1:+MD5"
+#define ALL_MACS "+SHA1:+MD5:+AEAD"
#define ALL_CERTTYPES "+CTYPE-X509"
#define ALL_KX "+RSA:+DHE-RSA:+DHE-DSS:+ANON-DH:+ECDHE-RSA:+ECDHE-ECDSA:+ANON-ECDH"
#define INIT_STR "NONE:"
@@ -572,7 +572,7 @@ test_code_t test_aes_gcm(gnutls_session_t session)
int ret;
sprintf(prio_str, INIT_STR
- "+AES-128-GCM:+AES-256-GCM:+AEAD:" ALL_COMP ":"
+ "+AES-128-GCM:+AES-256-GCM:" ALL_COMP ":"
ALL_CERTTYPES ":%s:" ALL_MACS ":" ALL_KX ":%s",
protocol_all_str, rest);
_gnutls_priority_set_direct(session, prio_str);
@@ -588,7 +588,7 @@ 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 ":"
+ "+AES-128-CCM:+AES-256-CCM:" ALL_COMP ":"
ALL_CERTTYPES ":%s:" ALL_MACS ":" ALL_KX ":%s",
protocol_all_str, rest);
_gnutls_priority_set_direct(session, prio_str);
@@ -604,7 +604,7 @@ 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 ":"
+ "+AES-128-CCM-8:+AES-256-CCM-8:" ALL_COMP ":"
ALL_CERTTYPES ":%s:" ALL_MACS ":" ALL_KX ":%s",
protocol_all_str, rest);
_gnutls_priority_set_direct(session, prio_str);
@@ -635,8 +635,8 @@ test_code_t test_camellia_gcm(gnutls_session_t session)
int ret;
sprintf(prio_str,
- INIT_STR "+CAMELLIA-128-GCM:+AEAD:" ALL_COMP ":" ALL_CERTTYPES
- ":%s:" ALL_KX ":%s", protocol_str, rest);
+ INIT_STR "+CAMELLIA-128-GCM:" ALL_COMP ":" ALL_CERTTYPES
+ ":%s:" ALL_MACS ":" ALL_KX ":%s", protocol_str, rest);
_gnutls_priority_set_direct(session, prio_str);
gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, xcred);
@@ -776,6 +776,20 @@ test_code_t test_arcfour(gnutls_session_t session)
return ret;
}
+test_code_t test_chacha20(gnutls_session_t session)
+{
+ int ret;
+
+ sprintf(prio_str,
+ INIT_STR "+CHACHA20-POLY1305:" ALL_COMP ":" ALL_CERTTYPES ":%s:"
+ ALL_MACS ":" ALL_KX ":%s", protocol_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_tls1(gnutls_session_t session)
{
int ret;