summaryrefslogtreecommitdiff
path: root/lib/ext/key_share.c
Commit message (Collapse)AuthorAgeFilesLines
* Use https:// for www.gnu.org and www.example.comTim Rühsen2019-03-131-1/+1
| | | | Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
* handshake: send missing extension alertNikos Mavrogiannopoulos2018-10-161-0/+1
| | | | | | | When a key share extension is not seen under TLS1.3, send the missing extension alert. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* ext/key_share: check the validity of server key sharesNikos Mavrogiannopoulos2018-07-271-0/+10
| | | | | | | | | That is, when generating the public key based on the server's key share, ensure that the algorithms match completely with the key shares the client initially sent. This was detected by the updated traces for TLS1.3 fuzzying. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Renamed extension supported ECC to supported groups. Fixes #451.Tom Vrancken2018-05-291-1/+1
| | | | | | Split combined ECC extensions into different files. Signed-off-by: Tom Vrancken <dev@tomvrancken.nl>
* handshake: do not send TLS extensions under DTLS and vice versatmp-prohibit-tls-dtls-mixNikos Mavrogiannopoulos2018-05-171-2/+2
| | | | | | | | | | That is, introduce the notion of TLS-only and DTLS-only extensions, providing a framework to prevent sending extensions which are registered for example for TLS 1.3, under DTLS and vice versa. Resolves #440 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* ANON,SRP,NULL ciphersuites: when set do not negotiate TLS1.3 or laterNikos Mavrogiannopoulos2018-04-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Added support for out-of-band Pre-shared keys under TLS1.3Ander Juaristi2018-04-061-2/+17
| | | | | | | | | | | That adds support for pre-shared keys with and without Diffie-Hellman key exchange. That's a modified version of initial Ander's patch. Resolves #414 Resolves #125 Signed-off-by: Ander Juaristi <a@juaristi.eus> Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.org>
* _gnutls_supported_ecc_recv_params: take into account precedenceNikos Mavrogiannopoulos2018-03-231-38/+29
| | | | | | | | | | | | That is, when %SERVER_PRECEDENCE is given in the priority string make sure that the negotiated curve of DH group respects the server's priorities. That's very relevant under TLS1.3 as ciphersuite negotiation itself, where %SERVER_PRECEDENCE applied, does contain only the cipher algorithm and MAC unlike TLS1.2 which included key exchange as well. Resolves #378 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Renumbered the key share extension to 51Nikos Mavrogiannopoulos2018-03-081-1/+1
| | | | | | | | This is a draft-ietf-tls-tls13-23 change. Resolves #398 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* session state: TLS1.2 and TLS1.3 state is stored as unionNikos Mavrogiannopoulos2018-02-191-48/+48
| | | | | | | | | That is, to reduce memory usage as these protocol cannot be used in parallel. Relates: #281 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* session state: organized key exchange keys into structuresNikos Mavrogiannopoulos2018-02-191-48/+48
| | | | | | | That is, with the view of separating the data needed for TLS1.2 and earlier and TLS1.3. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* key share: added flags to gnutls_init() to modify its default behaviorNikos Mavrogiannopoulos2018-02-191-20/+29
| | | | | | | | | | | | | | That way the application can adjust the range of keys generated during client hello attempting to guess the server's algorithm. Applications are intentionally not given the option to select the algorithm in the key share, but rather chose from the prioritized list of groups, to avoid a disconnect between the prioritized groups, and the key share sent. Relates #284 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* doc: document the GNUTLS_E_NO_COMMON_KEY_SHARE usageNikos Mavrogiannopoulos2018-02-191-1/+14
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* handshake: reduce assert printouts in common casesNikos Mavrogiannopoulos2018-02-191-1/+1
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* handshake: accept hello retry request in client sideNikos Mavrogiannopoulos2018-02-191-0/+37
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* handshake: send hello retry request when no key share matchesNikos Mavrogiannopoulos2018-02-191-6/+23
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* key share: removed duplicate messageNikos Mavrogiannopoulos2018-02-191-1/+0
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* ext/key_share: corrected release of MPI parametersNikos Mavrogiannopoulos2018-02-191-2/+2
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* extensions: use the low-level extension parsing code for hello parsingNikos Mavrogiannopoulos2018-02-191-1/+1
| | | | | | | That's a step towards unification of TLS-type extension handling for TLS 1.3. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* extensions: use an internal extension ID independent of the TLS idNikos Mavrogiannopoulos2018-02-191-1/+2
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* extensions: mark the message validity of each supported extensionNikos Mavrogiannopoulos2018-02-191-0/+1
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* extensions: type renamed to id for clarityNikos Mavrogiannopoulos2018-02-191-1/+1
| | | | | | | | | We were previously using the variable named 'type' to indicate the extension ID. With TLS 1.3, extensions are also given an applicability type (which message the extension applies to), and thus renamed the variable for clarity. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Added support for key share extensionNikos Mavrogiannopoulos2018-02-191-0/+665
This enables TLS 1.3 key exchange based on the key share extension. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>