diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-07-13 11:57:26 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-08-23 09:39:56 +0200 |
commit | 63c0ae2374d5351279af21e219499a1cd428db3a (patch) | |
tree | 02d12f0683f97509a2b256eb5176154af0019d4f | |
parent | 837d83c1b7ff5afebbafa31460e934714f8117d0 (diff) | |
download | gnutls-63c0ae2374d5351279af21e219499a1cd428db3a.tar.gz |
tests: resumption tests were restricted to TLS 1.2
TLS 1.3 implements resumption is a different way, so we should
introduce new resumption tests once that support is in place.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r-- | tests/Makefile.am | 20 | ||||
-rw-r--r-- | tests/resume.c | 10 |
2 files changed, 17 insertions, 13 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index dd55886d47..3b1ffd377c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -182,17 +182,17 @@ mini_dtls_pthread_LDADD = $(LDADD) -lpthread rng_pthread_LDADD = $(LDADD) -lpthread # These tests need gnulib for memmem() -resume_psk_CFLAGS = -DUSE_PSK -resume_psk_SOURCES = resume.c -resume_psk_LDADD = $(LDADD) ../gl/libgnu.la +tls12_resume_psk_CFLAGS = -DUSE_PSK -DTLS12 +tls12_resume_psk_SOURCES = resume.c +tls12_resume_psk_LDADD = $(LDADD) ../gl/libgnu.la -resume_anon_CFLAGS = -DUSE_ANON -resume_anon_SOURCES = resume.c -resume_anon_LDADD = $(LDADD) ../gl/libgnu.la +tls12_resume_anon_CFLAGS = -DUSE_ANON -DTLS12 +tls12_resume_anon_SOURCES = resume.c +tls12_resume_anon_LDADD = $(LDADD) ../gl/libgnu.la -resume_x509_CFLAGS = -DUSE_X509 -resume_x509_SOURCES = resume.c -resume_x509_LDADD = $(LDADD) ../gl/libgnu.la +tls12_resume_x509_CFLAGS = -DUSE_X509 -DTLS12 +tls12_resume_x509_SOURCES = resume.c +tls12_resume_x509_LDADD = $(LDADD) ../gl/libgnu.la dtls12_cert_key_exchange_SOURCES = common-cert-key-exchange.c dtls12-cert-key-exchange.c common-cert-key-exchange.h dtls10_cert_key_exchange_SOURCES = common-cert-key-exchange.c dtls10-cert-key-exchange.c common-cert-key-exchange.h @@ -283,7 +283,7 @@ endif if HAVE_FORK ctests += x509self x509dn anonself pskself dhepskself \ - setcredcrash resume-x509 resume-psk resume-anon + setcredcrash tls12-resume-x509 tls12-resume-psk tls12-resume-anon endif gc_CPPFLAGS = $(AM_CPPFLAGS) \ diff --git a/tests/resume.c b/tests/resume.c index 1bcd3b8d04..08b29f80c8 100644 --- a/tests/resume.c +++ b/tests/resume.c @@ -245,6 +245,10 @@ static void verify_alpn(gnutls_session_t session, struct params_res *params, uns success("ALPN got: %s\n", str); } +#ifdef TLS12 +# define VERS_STR "+VERS-TLS1.2" +#endif + static void client(int sds[], struct params_res *params) { int ret, ii; @@ -253,14 +257,14 @@ static void client(int sds[], struct params_res *params) unsigned int ext_master_secret_check = 0; char prio_str[256]; #ifdef USE_PSK -# define PRIO_STR "NONE:+VERS-TLS-ALL:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+PSK:+CURVE-ALL" +# define PRIO_STR "NONE:"VERS_STR":+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+PSK:+CURVE-ALL" const gnutls_datum_t pskkey = { (void *) "DEADBEEF", 8 }; gnutls_psk_client_credentials_t pskcred; #elif defined(USE_ANON) -# define PRIO_STR "NONE:+VERS-TLS-ALL:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+ANON-ECDH:+ANON-DH:+CURVE-ALL" +# define PRIO_STR "NONE:"VERS_STR":+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+ANON-ECDH:+ANON-DH:+CURVE-ALL" gnutls_anon_client_credentials_t anoncred; #elif defined(USE_X509) -# define PRIO_STR "NONE:+VERS-TLS-ALL:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+ECDHE-RSA:+RSA:+CURVE-ALL" +# define PRIO_STR "NONE:"VERS_STR":+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+ECDHE-RSA:+RSA:+CURVE-ALL" gnutls_certificate_credentials_t clientx509cred; #endif |