diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2018-04-11 08:34:15 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2018-04-13 08:49:19 +0200 |
commit | 74830d83eb09f440214b3dedb929677ebc0358a7 (patch) | |
tree | 0edcc6dcb663920de5f5a0ee18697a98695112f3 /lib/handshake.c | |
parent | 6009094a8cb41ce82f634708dd846ab867d9483a (diff) | |
download | gnutls-74830d83eb09f440214b3dedb929677ebc0358a7.tar.gz |
ANON,SRP,NULL ciphersuites: when set do not negotiate TLS1.3 or later
The reason is that these ciphersuites cannot be negotiated using TLS1.3.
There is a different strategy followed for these.
* NULL ciphersuites: they are not something normally enabled and used
for debugging purposes mostly. When set both in client and server side
only TLS1.2 can be used.
* SRP ciphersuites: they are used on client side when the client is actually
performing a username-password authentication with SRP. On server side we
can have indeed a server support SRP and non-SRP. In that case we limit
both on TLS1.2. That an unfortunate restriction, but is not a regression
and IMHO these servers would most likely be phased out as very few would
want to stick to TLS1.2 connections for SRP; or we may have an SRP update
for TLS1.3 which could lift that limitation in the future.
* ANON ciphersuites: they are used in certain client/server setups where very
basic level of security is required, and in opportunistic encryption scenarios.
There is a difference in the handling of these cases. In the case of Anon-only
server/clients they provide the session with anonymous credentials structure; in
the case of opportunistic encryption they provide both certificate and anonymous
credentials. Thus we allow the protocol (TLS1.3) be in the priorities, but if we
see no certificate or PSK credentials we disable TLS1.3 negotiation.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/handshake.c')
-rw-r--r-- | lib/handshake.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/handshake.c b/lib/handshake.c index 5d2bf9b852..baae557c63 100644 --- a/lib/handshake.c +++ b/lib/handshake.c @@ -246,7 +246,7 @@ int _gnutls_set_server_random(gnutls_session_t session, const version_entry_st * /* check whether the server random value is set according to * to TLS 1.3. p4.1.3 requirements */ - if (!IS_DTLS(session) && vers->id <= GNUTLS_TLS1_2) { + if (!IS_DTLS(session) && vers->id <= GNUTLS_TLS1_2 && have_creds_for_tls13(session)) { max = _gnutls_version_max(session); if (max->id <= GNUTLS_TLS1_2) |