summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* retrieve_pin: refuse to retrieve PIN from URI more than one timetmp-pkcs11-wrong-pinNikos Mavrogiannopoulos2018-04-242-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>
* 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
| * psk: save the username on auth info struct under TLS1.3Nikos Mavrogiannopoulos2018-04-063-1/+25
| | | | | | | | | | | | | | Add the necessary tests to verify that gnutls_psk_server_get_username() reports the right username under TLS1.2 and TLS1.3. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * tests: enhanced test suite for TLS1.3 and PSKNikos Mavrogiannopoulos2018-04-065-42/+411
| | | | | | | | | | | | | | | | That includes tests with unknown usernames and connections with wrong key and updates to fastopen.sh to use certificate auth, making it applicable under TLS1.3. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
| * priority: added GROUP-DH-ALL and GROUP-EC-ALLNikos Mavrogiannopoulos2018-04-062-1/+31
| | | | | | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * dumbfw: account for extension data paddingNikos Mavrogiannopoulos2018-04-061-3/+5
| | | | | | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * Simplified the _gnutls13_psk_ext_parser interface and added unit testsNikos Mavrogiannopoulos2018-04-067-85/+247
| | | | | | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * Added support for out-of-band Pre-shared keys under TLS1.3Ander Juaristi2018-04-0633-136/+1379
|/ | | | | | | | | | | 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>
* certtool: key-type desc was moved along the privkey functionality [ci skip]Nikos Mavrogiannopoulos2018-04-061-9/+9
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* gnutls_record_can_use_length_hiding: corrected return typeNikos Mavrogiannopoulos2018-04-042-2/+2
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* encrypt_packet_tls13: reverted to original APINikos Mavrogiannopoulos2018-04-041-23/+23
| | | | | | | That allows more uniformity across encrypt/decrypt, and across different protocol handling. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Merge branch 'tmp-nettle-version-check-update' into 'master'Nikos Mavrogiannopoulos2018-03-261-1/+1
|\ | | | | | | | | nettle: corrected typo in version check for compatibility mode with 3.3 See merge request gnutls/gnutls!614
| * nettle: corrected typo in version check for compatibility mode with 3.3tmp-nettle-version-check-updateNikos Mavrogiannopoulos2018-03-251-1/+1
|/ | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Merge branch 'tmp-draft-ietf-tls13-26' into 'master'Nikos Mavrogiannopoulos2018-03-2414-115/+362
|\ | | | | | | | | | | | | Move to draft-ietf-tls-tls13-26 Closes #409, #378, and #410 See merge request gnutls/gnutls!611
| * doc updatetmp-draft-ietf-tls13-26Nikos Mavrogiannopoulos2018-03-231-1/+5
| | | | | | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * protocols: bumped TLS1.3 protocol to draft -26Nikos Mavrogiannopoulos2018-03-233-6/+6
| | | | | | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * record: added AAD data when encrypting or decryptingNikos Mavrogiannopoulos2018-03-231-36/+54
| | | | | | | | | | | | | | | | This is a requirement of draft-ietf-tls-tls13-25 Resolves #409 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * priorities: disable any key exchange methods if there is no TLS1.2 or earlierNikos Mavrogiannopoulos2018-03-232-16/+37
| | | | | | | | | | | | | | | | | | | | | | That is, because TLS1.2 has specific requirements in the ordering of curves/groups if certain ciphersuites (ECDHE/DHE) are present, and by being able to eliminate them early we simplify the negotiation for TLS1.3-only clients/servers. Relates #378 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * _gnutls_supported_ecc_recv_params: take into account precedenceNikos Mavrogiannopoulos2018-03-237-58/+259
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * supported_versions: cannot be used to negotiate pre-TLS1.3Nikos Mavrogiannopoulos2018-03-231-0/+3
|/ | | | | | | | This is a requirement of draft-ietf-tls-tls13-26 Resolves #410 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* doc update [ci skip]Nikos Mavrogiannopoulos2018-03-231-0/+4
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* doc: mention gnutls_privkey_import_ext4 in upgrade from 3.5.xNikos Mavrogiannopoulos2018-03-232-2/+5
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* doc: added since field in gnutls_record_send2() descriptionNikos Mavrogiannopoulos2018-03-232-1/+3
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Makefile.am: reduce automake warnings and corrected versionNikos Mavrogiannopoulos2018-03-231-6/+6
| | | | | | | That is, avoid using the := syntax, set the right version variable and use a hidden file for abi-check cache stamp. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* The abi-check target was updated to check against the last tagNikos Mavrogiannopoulos2018-03-223-25/+50
| | | | | | | | | | | | | | | | | As abi-dumper and abi-compliance-checker tools are not reliable when run across different systems, we now compare the previous tag ABI with the current compiled library. That is in contrast with the previous behavior of storing the output files of abi-dumper, which can become obsolete on a CI update. That also moves the ABI check only on the CI, and not in the 'make dist' rule as it takes significant time to run. This relates to an issue reported against libidn2's use of abi-compliance-checker but it affects gnutls as they share similar code: https://gitlab.com/libidn/libidn2/issues/42 Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* nettle/pk: include nettle/version.hNikos Mavrogiannopoulos2018-03-201-0/+1
| | | | | | That enables the nettle version macros to operate. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>