diff options
| author | Daniel Lenski <dlenski@gmail.com> | 2020-03-22 19:01:55 -0700 |
|---|---|---|
| committer | Daniel Lenski <dlenski@gmail.com> | 2020-03-22 19:08:16 -0700 |
| commit | f64a95e0ffa2e10b6e1eafcd4e76f934fd785ce7 (patch) | |
| tree | 3cf02c1f1cbba5c857c937bca0c9657747807a7d /src/tests.c | |
| parent | 2fad80f5ac10e4d70a8caf31c6e935cab25a146c (diff) | |
| download | gnutls-f64a95e0ffa2e10b6e1eafcd4e76f934fd785ce7.tar.gz | |
add additional tests of SSL 3.0 (with extensions, and with cipher suites not in SSL 3.0)
See #958
Signed-off-by: Daniel Lenski <dlenski@gmail.com>
Diffstat (limited to 'src/tests.c')
| -rw-r--r-- | src/tests.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/tests.c b/src/tests.c index 1062b3c168..8cc06347c1 100644 --- a/src/tests.c +++ b/src/tests.c @@ -624,6 +624,40 @@ test_code_t test_ssl3(gnutls_session_t session) return ret; } +test_code_t test_ssl3_with_extensions(gnutls_session_t session) +{ + int ret; + sprintf(prio_str, INIT_STR + SSL3_CIPHERS ":" ALL_COMP ":+VERS-SSL3.0:" + SSL3_MACS ":" SSL3_KX ":%s", rest); + _gnutls_priority_set_direct(session, prio_str); + + gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, xcred); + + ret = test_do_handshake(session); + if (ret == TEST_SUCCEED) + ssl3_ok = 1; + + return ret; +} + +test_code_t test_ssl3_unknown_ciphersuites(gnutls_session_t session) +{ + int ret; + sprintf(prio_str, INIT_STR + ALL_CIPHERS ":" ALL_COMP ":+VERS-SSL3.0:%%NO_EXTENSIONS:" + ALL_MACS ":" ALL_KX ":%s", rest); + _gnutls_priority_set_direct(session, prio_str); + + gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, xcred); + + ret = test_do_handshake(session); + if (ret == TEST_SUCCEED) + ssl3_ok = 1; + + return ret; +} + static int alrm = 0; static void got_alarm(int k) { |
