summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* updated auto-generated filestmp-openssl-suiteNikos Mavrogiannopoulos2018-05-032-72/+136
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: added interop tests with openssl under TLS1.3Nikos Mavrogiannopoulos2018-05-0312-7/+677
| | | | | | | | | | | | | This adds interoperability tests for: * PSK with elliptic curve DHE * RSA,RSA-PSS,secp256r1,ed25519 server certificate * RSA,RSA-PSS,secp256r1,ed25519 client certificate * X25519,SECP256R1 key share exchange * key share with HRR Relates #328 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* doc: clarified re-handshake details under TLS1.2 serverNikos Mavrogiannopoulos2018-05-031-1/+5
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tls13/certificate_request: corrected check of duplicate signature algorithmsNikos Mavrogiannopoulos2018-05-034-22/+45
| | | | | | | | | | Made the check local when parsing a certificate request, as we may receive multiple requests when post-handshake authentication is in place. Furthermore check whether this extension has been received as this is a mandatory one. In addition handle a memory leak when multiple peer certificates are set. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* gnutls_reauth: doc updateNikos Mavrogiannopoulos2018-05-031-1/+3
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* gnutls-cli: enhanced tool for TLS1.3 optionsNikos Mavrogiannopoulos2018-05-035-21/+91
| | | | | | | This patch allows a client to enable post-handshake authentication, perform re-key and restrict the sent key shares. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* tls13/certificate: send empty certificate instead of skippingNikos Mavrogiannopoulos2018-05-031-25/+22
| | | | | | | | | | According to TLS1.3 spec: The server's certificate_list MUST always be non-empty. A client will send an empty certificate_list if it does not have an appropriate certificate to send in response to the server's authentication request. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* _gnutls_figure_common_ciphersuite: ignore certificate check if PSK is negotiatedNikos Mavrogiannopoulos2018-05-031-6/+2
| | | | | | | | That is, if we are performing PSK under TLS1.3, don't bother checking whether the certificate is compatible with the ciphersuite; there isn't any. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tls13/certificate_verify: corrected context in signatures in client sideNikos Mavrogiannopoulos2018-05-031-7/+24
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* _gnutls13_handshake_sign_data: avoid unnecessary copyNikos Mavrogiannopoulos2018-05-031-6/+9
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* handshake: cleanup in TLS1.3 initial secret calculationNikos Mavrogiannopoulos2018-05-031-15/+3
| | | | | | That eliminates duplicate code in server hello parsing. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* psk: compute binder which is compatible with draft-ietf-tls-tls13Nikos Mavrogiannopoulos2018-05-032-15/+21
| | | | | | | | | Previously the computed binder values was not compatible with any TLS1.3 draft, and was not interoperating with openssl or tlslite. Resolves #427 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Merge branch 'tmp-rsa-psk-fix' into 'master'Nikos Mavrogiannopoulos2018-04-305-10/+271
|\ | | | | | | | | RSA-PSK ciphersuites: only use under TLS1.2 See merge request gnutls/gnutls!624
| * tests: check the behavior of TLS1.2 key exchange methods under TLS1.3Nikos Mavrogiannopoulos2018-04-303-1/+249
| | | | | | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * psk: mark psk_ke_modes as invalid when ignoredNikos Mavrogiannopoulos2018-04-301-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | TLS1.3 handles the receiving of pre-shared keys extension as invalid when the psk_ke_modes extension is not received as well. As such, when we ignore the psk_ke_modes for some reason (e.g., no credentials) we need to indicate that it was received. We use the invalid mode flag for that reason, allowing the handshake to fail later for the right reason (e.g., no credentials error rather than illegal extension). Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * priority: handle RSA-PSK ciphersuites similar to SRPNikos Mavrogiannopoulos2018-04-301-5/+11
|/ | | | | | That is, when specified disable TLS1.3. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Merge branch 'tmp-sni-hostname' into 'master'Nikos Mavrogiannopoulos2018-04-2910-1023/+1135
|\ | | | | | | | | | | | | tests: updated sni-hostname check for TLS1.3 Closes #344 See merge request gnutls/gnutls!623
| * Add another sni related testtmp-sni-hostnameAndreas Metzler2018-04-291-0/+3
| | | | | | | | | | | | | | As --sni-hostname does not imply --verify-hostname a hostname mismatch still triggers an error. Signed-off-by: Andreas Metzler <ametzler@bebt.de>
| * tests: sni-hostname was updated to support TLS1.3Nikos Mavrogiannopoulos2018-04-294-9/+70
| | | | | | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * updated auto-generated filesNikos Mavrogiannopoulos2018-04-294-1005/+1040
| | | | | | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
| * doc: Add crossreference/warningAndreas Metzler2018-04-291-1/+1
| | | | | | | | | | | | Add pointer to --verify-hostname to --sni-hostname description. Signed-off-by: Andreas Metzler <ametzler@bebt.de>
| * gnutls-cli: added option to specify the verification hostnameNikos Mavrogiannopoulos2018-04-292-8/+21
|/ | | | | | | | | | This enables testing various scenarios, by allowing to specify the hostname to be used for certificate validation when connecting to a remote host (e.g., localhost but with a certificate for example.com). Resolves #344 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* doc: fixes for better latex pdf generation [ci skip]Nikos Mavrogiannopoulos2018-04-263-6/+4
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* retrieve_pin: refuse to retrieve PIN from URI more than one timeNikos Mavrogiannopoulos2018-04-252-3/+36
| | | | | | | | | That is, prevent re-using a static PIN if it has already been known to be wrong. Introduced tests of that behavior. Resolves #425 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* doc: updated OCSP documentation [ci skip]Nikos Mavrogiannopoulos2018-04-241-6/+6
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* gnutls.h.in: corrected typo [ci skip]Nikos Mavrogiannopoulos2018-04-221-3/+3
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* fuzz: corrected TLS1.3 enablement [ci skip]Nikos Mavrogiannopoulos2018-04-225-4/+7
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Merge branch 'tmp-constate-fix' into 'master'Nikos Mavrogiannopoulos2018-04-1830-393/+381
|\ | | | | | | | | | | | | Fix re-handshake failure when interrupted by application data Closes #426 See merge request gnutls/gnutls!620
| * _gnutls_epoch_new: allow re-allocation epoch next epochtmp-constate-fixNikos Mavrogiannopoulos2018-04-184-10/+22
| | | | | | | | | | | | | | | | | | | | | | On certain cases when re-handshake is interrupted by application data, _gnutls_epoch_new() will be called twice. Make sure that this does not lead to an error. We also rename the function to clarify its purpose _gnutls_epoch_setup_next(). Resolves #426 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * tests: added reproducers for receiving app data when rehandshake is expectedNikos Mavrogiannopoulos2018-04-183-40/+132
| | | | | | | | | | | | Relates: #426 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * tests: eliminated exit_code variable used in few testsNikos Mavrogiannopoulos2018-04-1819-172/+0
| | | | | | | | | | | | | | It was a legacy variable for error printing that was never used uniformly. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * tests: eagain: moved to cmocka and enhanced for TLS1.3Nikos Mavrogiannopoulos2018-04-185-169/+222
| | | | | | | | | | | | That also makes macros from eagain-common.h functioning under cmocka. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * tests: tls12-rehandshake-cert*: run multiple rehandshake testsNikos Mavrogiannopoulos2018-04-183-19/+22
|/ | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Merge branch 'tmp-memleak-fix' into 'master'Nikos Mavrogiannopoulos2018-04-172-3/+7
|\ | | | | | | | | tls13/finished: addressed memory leak in receiving finished packet See merge request gnutls/gnutls!619
| * tls13/finished: addressed memory leak in receiving finished packetNikos Mavrogiannopoulos2018-04-172-3/+7
|/ | | | | | | Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7518 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* priority: document the reasons for the order of supported groups [ci skip]Nikos Mavrogiannopoulos2018-04-161-0/+5
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* handshake: described the epoch reference counting [ci skip]Nikos Mavrogiannopoulos2018-04-161-0/+4
| | | | | | | | | It is used only in DTLS where multiple handshake states may be active. Resolves #421 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* tests: tls12-rehandshake-cert-3: run multiple rehandshake testsNikos Mavrogiannopoulos2018-04-161-23/+44
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Merge branch 'tmp-disable-tls13' into 'master'Nikos Mavrogiannopoulos2018-04-1315-90/+190
|\ | | | | | | | | Disable TLS1.3 under certain priority strings See merge request gnutls/gnutls!617
| * doc updatetmp-disable-tls13Nikos Mavrogiannopoulos2018-04-131-0/+6
| | | | | | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * ANON,SRP,NULL ciphersuites: when set do not negotiate TLS1.3 or laterNikos Mavrogiannopoulos2018-04-1314-90/+184
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ext/pre_shared_key: cleanups in error handlingNikos Mavrogiannopoulos2018-04-072-17/+39
| | | | | | | | | | | This addresses a memory leak found via oss-fuzz. It also sets the right index on the selected PSK, and returns the right server error code on incorrect key file. Addresses: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7465 Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* ext/psk_ke_modes: corrected data accessNikos Mavrogiannopoulos2018-04-072-1/+2
| | | | | | | | | That also improves the if-checks. Issue and reproducer discovered via oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7470 Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* fuzz: added client and server traces for TLS 1.3 draft-26 [ci skip]Nikos Mavrogiannopoulos2018-04-076-0/+0
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* doc: corrected space-tab issues in examplesNikos Mavrogiannopoulos2018-04-071-4/+4
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* constate: fixed key generation for TLS1.3Nikos Mavrogiannopoulos2018-04-062-8/+4
| | | | | | | | | | | | | This amends 62ea232f180b980a0d4b6462c468706db6cc4700, and removes invalid NULL checks, as well as corrects the key set for server side. This is verified against openssl master, but does not include automated test suite; it will be tested as part of #328 Resolves #419 Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* doc: re-organized and modernized examplesNikos Mavrogiannopoulos2018-04-064-194/+190
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* doc: updated for TLS1.3Nikos Mavrogiannopoulos2018-04-064-160/+139
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* fuzz: added PSK traces with TLS1.3Nikos Mavrogiannopoulos2018-04-067-2/+3
| | | | | | Relates: #359 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Merge branch 'tmp-psk-tls1.3' into 'master'Nikos Mavrogiannopoulos2018-04-0642-185/+2015
|\ | | | | | | | | | | | | TLS1.3: add support for PSK key exchange Closes #414 and #125 See merge request gnutls/gnutls!615