diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2019-09-02 16:34:08 +0300 |
---|---|---|
committer | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2019-09-02 17:29:38 +0300 |
commit | 90ced0974a22afa30fe5d3217512033d91ca89dc (patch) | |
tree | 11bf1c402924cf59888367c4fee7f7922c8953b2 /src/tests.h | |
parent | 6522c27d70d29cdb67cbfe5864e2f02bdda69970 (diff) | |
download | gnutls-90ced0974a22afa30fe5d3217512033d91ca89dc.tar.gz |
gnutls-cli-debug: fix early break for no version supported check
Currently gnutls-cli-debug code hardodes index of tests, after which it
will check if any known protocols (SSL 3.0/TLS1.[0123]) are supported by
the server. However this number is hardcoded and thus easy to break.
This is exactly what happened after adding %ALLOW_SMALL_RECORDS check.
Two tests were added in front of tests lists without updating this
index.
So let's make this check robust by adding another test which will return
fatal error if no known protocols are supported. While we are at it,
also simplify tests loop by removing internal loop completely and
controlling opening/closing a socket with a flag.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Diffstat (limited to 'src/tests.h')
-rw-r--r-- | src/tests.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tests.h b/src/tests.h index c391d97bfb..80c590585d 100644 --- a/src/tests.h +++ b/src/tests.h @@ -53,6 +53,7 @@ test_code_t test_safe_renegotiation_scsv(gnutls_session_t state); test_code_t test_tls1_1(gnutls_session_t state); test_code_t test_tls1_2(gnutls_session_t state); test_code_t test_tls1_3(gnutls_session_t state); +test_code_t test_known_protocols(gnutls_session_t state); test_code_t test_tls1_1_fallback(gnutls_session_t state); test_code_t test_tls1_6_fallback(gnutls_session_t state); test_code_t test_tls_disable0(gnutls_session_t state); |