diff options
author | Daiki Ueno <dueno@redhat.com> | 2019-05-17 11:51:00 +0200 |
---|---|---|
committer | Daiki Ueno <dueno@redhat.com> | 2019-05-22 08:17:11 +0200 |
commit | 0caf5b6922bd443bcf3eb1398a16c9d381fba86f (patch) | |
tree | 6fe17727ff806cc23d24b857fe0f67a80f996f2d /lib/algorithms | |
parent | 86d5c56950489bc8469f73602d793ef48af6419a (diff) | |
download | gnutls-0caf5b6922bd443bcf3eb1398a16c9d381fba86f.tar.gz |
algorithms: eliminate the FFDHE alert desc requirement
This implements the errata for RFC 7919 eliminating the requirement to
reply with an insufficient_security alert when we have negotiated an
FFDHE group, but cannot find common ciphersuite:
https://www.rfc-editor.org/errata/eid4908
Signed-off-by: Daiki Ueno <dueno@redhat.com>
Diffstat (limited to 'lib/algorithms')
-rw-r--r-- | lib/algorithms/ciphersuites.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/lib/algorithms/ciphersuites.c b/lib/algorithms/ciphersuites.c index 0c393af044..b7abfe607f 100644 --- a/lib/algorithms/ciphersuites.c +++ b/lib/algorithms/ciphersuites.c @@ -1461,7 +1461,6 @@ _gnutls_figure_common_ciphersuite(gnutls_session_t session, unsigned int is_dtls = IS_DTLS(session); gnutls_kx_algorithm_t kx; gnutls_credentials_type_t cred_type = GNUTLS_CRD_CERTIFICATE; /* default for TLS1.3 */ - unsigned int no_cert_found = 0; const gnutls_group_entry_st *sgroup = NULL; gnutls_ext_priv_data_t epriv; unsigned have_etm = 0; @@ -1517,7 +1516,6 @@ _gnutls_figure_common_ciphersuite(gnutls_session_t session, if (ret < 0) { /* couldn't select cert with this ciphersuite */ gnutls_assert(); - no_cert_found = 1; break; } } @@ -1562,7 +1560,6 @@ _gnutls_figure_common_ciphersuite(gnutls_session_t session, if (ret < 0) { /* couldn't select cert with this ciphersuite */ gnutls_assert(); - no_cert_found = 1; break; } } @@ -1580,16 +1577,7 @@ _gnutls_figure_common_ciphersuite(gnutls_session_t session, /* nothing in common */ - /* RFC7919 requires that we reply with insufficient security if we have - * negotiated an FFDHE group, but cannot find a common ciphersuite. However, - * we must also distinguish between not matching a ciphersuite due to an - * incompatible certificate which we traditionally return GNUTLS_E_NO_CIPHER_SUITES. - */ - if (!no_cert_found && (session->internals.hsk_flags & HSK_HAVE_FFDHE) && - session->internals.priorities->groups.have_ffdhe && !version->tls13_sem) - return gnutls_assert_val(GNUTLS_E_INSUFFICIENT_SECURITY); - else - return gnutls_assert_val(GNUTLS_E_NO_CIPHER_SUITES); + return gnutls_assert_val(GNUTLS_E_NO_CIPHER_SUITES); } #define CLIENT_VERSION_CHECK(minver, maxver, e) \ |