summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * use a consistent method to mark fall-through in switch casesNikos Mavrogiannopoulos2018-08-0814-99/+144
|/ | | | | | | | Also document that method in contribution guide. Resolves #306 Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Merge branch 'tmp-tlsfuzzer-update-tls13' into 'master'Daiki Ueno2018-08-0818-25/+225
|\ | | | | | | | | | | | | tlsfuzzer: update to the latest version to enable more TLS 1.3 tests Closes #537 See merge request gnutls/gnutls!727
| * ext/pre_shared_key: prevent crash if no server credentials are setDaiki Ueno2018-08-082-12/+28
| | | | | | | | | | | | | | | | | | | | | | | | Previously, if server is configured without PSK credentials and the client authenticated with PSK, the server crashed with: Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7b190ba in server_recv_params (session=0x636fc0, data=0x634e6e "", len=46, pskcred=0x0) at pre_shared_key.c:523 523 prf = pskcred->binder_algo; Signed-off-by: Daiki Ueno <dueno@redhat.com>
| * tlsfuzzer: update to the latest versionDaiki Ueno2018-08-083-3/+7
| | | | | | | | | | | | | | | | Also enable test-tls13-ffdhe-sanity.py, test-tls13-session-resumption.py, and test-tls13-unrecognised-groups.py. Signed-off-by: Daiki Ueno <dueno@redhat.com>
| * alert: map GNUTLS_E_NO_COMMON_KEY_SHARE to handshake_failureDaiki Ueno2018-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | Previously, when server received a ClientHello that does include only groups from unassigned ranges in supported_groups, it aborted the connection with an illegal_parameter. Resolves #537 Signed-off-by: Daiki Ueno <dueno@redhat.com>
| * algorithms: add support for FFDHE6144Daiki Ueno2018-08-0812-9/+189
|/ | | | Signed-off-by: Daiki Ueno <dueno@redhat.com>
* Merge branch 'tmp-fix-ecdsa-pubkey-import' into 'master'Nikos Mavrogiannopoulos2018-08-075-11/+183
|\ | | | | | | | | | | | | Corrected the importing of ECDSA public keys Closes #538 See merge request gnutls/gnutls!725
| * Corrected the importing of ECDSA public keysNikos Mavrogiannopoulos2018-08-075-11/+183
|/ | | | | | | | | | | | This seems to be a regression since EdDSA support. The call to _gnutls_x509_get_pk_algorithm() in public key import was unnecessary and in fact it was overriding the available curve with a curve associated with the OID. As the ECDSA OID doesn't include the curve, that had the result of deleting the already read curve. Resolves #538 Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Ensure we are sending the right protocol version on second client helloNikos Mavrogiannopoulos2018-08-073-4/+242
| | | | | | | | | | | | That is, when we respond to a Hello Retry Request as client, we put the TLS1.2 version on the second client hello to send a hello that is as close as possible to the original hello. That effectively separates the handling of TLS1.2 rehandshake and TLS1.3 hello retry request when sending a client hello. Resolves #535 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* doc: improved text on certificationsNikos Mavrogiannopoulos2018-08-071-7/+4
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* doc: few improvements over certificate validation textNikos Mavrogiannopoulos2018-08-073-10/+29
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Merge branch 'tmp-persistent-id' into 'master'Nikos Mavrogiannopoulos2018-08-079-71/+111
|\ | | | | | | | | | | | | resumption: keep persistent session identifiers Closes #484 See merge request gnutls/gnutls!721
| * gnutls-serv: re-introduce the session identifier messageNikos Mavrogiannopoulos2018-08-071-11/+9
| | | | | | | | | | | | | | | | The message "If your browser supports session resuming, then you should see the same session ID, when you press the reload button", is now printed again even under TLS1.3. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
| * resume: keep persistent session identifiersNikos Mavrogiannopoulos2018-08-078-60/+102
|/ | | | | | | | | | | | With the introduction of session ticket support (TLS1.2) and TLS1.3, session identifiers have no persistency on server or client side. Improve the situation by introducing persistent session identifiers on server side in a backwards compatible way. Resolves #484 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Merge branch 'tmp-handshake-interleave' into 'master'Nikos Mavrogiannopoulos2018-08-069-47/+93
|\ | | | | | | | | | | | | Fix interleaved handshake handling in TLS 1.3 Closes #272 See merge request gnutls/gnutls!708
| * .gitlab-ci.yml: include fuzz/*.log in artifactsDaiki Ueno2018-08-061-0/+1
| | | | | | | | Signed-off-by: Daiki Ueno <dueno@redhat.com>
| * tests: tls-fuzzer: enable tests relying on header fragmentationDaiki Ueno2018-08-062-19/+10
| | | | | | | | | | | | | | Those tests were previously disabled because splitting of handshake messages in a very short (< 4 bytes) fragments is not implemented. Signed-off-by: Daiki Ueno <dueno@redhat.com>
| * record: send unexpected_message upon empty unencrypted recordsDaiki Ueno2018-08-061-1/+8
| | | | | | | | Signed-off-by: Daiki Ueno <dueno@redhat.com>
| * buffers: handle very short fragmentation of handshake messagesDaiki Ueno2018-08-063-3/+36
| | | | | | | | | | | | | | | | | | | | | | | | If the received record doesn't even complete the handshake header (i.e., the record size < 4), keep it in a temporary buffer and let the caller receive more records. Once enough amount of data is received, move the already received records back to record_buffer and proceed to the normal processing. Fixes: #272 Signed-off-by: Daiki Ueno <dueno@redhat.com>
| * mbuffers: introduce _mbuffer_head_push_firstDaiki Ueno2018-08-062-0/+21
| | | | | | | | | | | | | | | | | | This is similar to _mbuffer_enqueue, but adds an element to the beginning of the buffer. This is to make the incomplete header handling case easier. Signed-off-by: Daiki Ueno <dueno@redhat.com>
| * _gnutls_parse_record_buffered_msgs: eliminate local variable usageDaiki Ueno2018-08-061-11/+5
| | | | | | | | | | | | | | | | | | If `remain > 0` is true, `recv_buf[0].length > 0` always holds. Combine those conditions and remove the `remain` utilizing MIN(). This is to make the incomplete header handling case easier. Signed-off-by: Daiki Ueno <dueno@redhat.com>
| * buffers: avoid confusion in fragment length calculationDaiki Ueno2018-08-061-14/+13
|/ | | | | | | | Previously, to calculate the fragment length, it added/subtracted one to the ending offset back and forth; that was not easier to read and couldn't handle empty payload messages in TLS. Signed-off-by: Daiki Ueno <dueno@redhat.com>
* Merge branch 'tmp-skip-zero-rtt' into 'master'Nikos Mavrogiannopoulos2018-08-0617-4/+219
|\ | | | | | | | | | | | | TLS 1.3: ignore "early_data" extension Closes #512 See merge request gnutls/gnutls!706
| * tlsfuzzer: update to the latest versionDaiki Ueno2018-08-063-1/+3
| | | | | | | | | | | | Also enable test-tls13-0rtt-garbage.py. Signed-off-by: Daiki Ueno <dueno@redhat.com>
| * TLS 1.3: ignore "early_data" extensionDaiki Ueno2018-08-0614-3/+216
|/ | | | | | | | | | As 0-RTT is still not implemented in GnuTLS, the server responds with 1-RTT, by skipping decryption failure up to max_early_data_size, as suggested in 4.2.10 Early Data Detection. Resolves #512 Signed-off-by: Daiki Ueno <dueno@redhat.com>
* p11tool: print expiration time on certificatesNikos Mavrogiannopoulos2018-08-032-66/+109
| | | | | | | This is particularly useful when displaying information about a certificate trust store. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* Merge branch 'tmp-handshake-return-early' into 'master'Nikos Mavrogiannopoulos2018-08-0323-123/+743
|\ | | | | | | | | | | | | tls1.3: server returns early on handshake when no cert is provided by client Closes #481 and #457 See merge request gnutls/gnutls!711
| * tls1.3: server returns early on handshake when no cert is provided by clientNikos Mavrogiannopoulos2018-08-0322-117/+734
| | | | | | | | | | | | | | | | | | | | | | | | Under TLS1.3 the server knows the negotiated keys early, if no client certificate is sent. In that case, the server is not only able to transmit the session ticket immediately after its finished message, but is also able to transmit data, similarly to false start. Resolves #481 Resolves #457 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * gnutls-serv: don't close connection properly when handshake is not yet completeNikos Mavrogiannopoulos2018-08-031-6/+9
|/ | | | | | | | | In the case handshake is not yet complete and we need to terminate, it is because of an issue. As such prefer an unclear termination at this stage. This addresses error detection issues with tlsfuzzer. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* gnutls-cli: corrected input buffer null-terminationtmp-cli-buffer-termNikos Mavrogiannopoulos2018-08-021-1/+0
| | | | | | | | | | This was a regression in the previous cleanup at f138ff85df69976badce44a5c46157cce091020f included in 3.6.3. Resolves #534 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* certtool: added example of converting to DER in manpageNikos Mavrogiannopoulos2018-07-311-1/+7
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Merge branch 'tmp-fix-wabi' into 'master'Tim Rühsen2018-07-281-0/+1
|\ | | | | | | | | | | | | Fix gcc-8 -Wabi warnings Closes #531 See merge request gnutls/gnutls!720
| * Fix gcc-8 -Wabi warningsTim Rühsen2018-07-271-0/+1
|/ | | | | | Fixes #531 Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
* Merge branch 'tmp-test-large-cert' into 'master'Nikos Mavrogiannopoulos2018-07-2719-95/+2973
|\ | | | | | | | | | | | | tests: improved test suite Closes #508 and #513 See merge request gnutls/gnutls!719
| * ext/key_share: check the validity of server key sharesNikos Mavrogiannopoulos2018-07-272-0/+11
| | | | | | | | | | | | | | | | | | 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>
| * gnutls-serv: improve output under TLS1.3Nikos Mavrogiannopoulos2018-07-272-62/+90
| | | | | | | | | | | | | | | | That is, silence fields no longer applicable under TLS1.3 and make sure that newer functions like gnutls_session_get_desc() get used when describing the session. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * fuzz: updated traces for latest TLS1.3 draftNikos Mavrogiannopoulos2018-07-277-0/+26
| | | | | | | | | | | | Relates #359 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * tests: run tls-fuzzer PSK testsuiteNikos Mavrogiannopoulos2018-07-273-1/+88
| | | | | | | | | | | | Resolves #508 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * tests: added unit test of handshake with large certificateNikos Mavrogiannopoulos2018-07-263-2/+2734
| | | | | | | | | | | | | | | | | | This checks whether handshake message fragmentation and de-fragmentation is functional on server and client. Resolves #513 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * certtool: eliminated limits in certificate export sizeNikos Mavrogiannopoulos2018-07-261-20/+20
| | | | | | | | | | | | | | That allows printing an exporting certificates of size only bounded by avail memory. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * certtool: eliminate maximum limit in fields read with ↵Nikos Mavrogiannopoulos2018-07-261-10/+4
|/ | | | | | | | READ_MULTI_LINE_TOKENIZED() This allows to generate a certificate with an extension of arbitrary size. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Merge branch 'tmp-tls13-fixes' into 'master'Tim Rühsen2018-07-264-14/+46
|\ | | | | | | | | | | | | Fixes on TLS1.3 support Closes #525 See merge request gnutls/gnutls!718
| * gnutls.h: corrected typotmp-tls13-fixesNikos Mavrogiannopoulos2018-07-251-1/+1
| | | | | | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * send_client_hello: don't override version after HRR is receivedNikos Mavrogiannopoulos2018-07-252-12/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | When a Hello Retry Request is received, do not set our (transient) version to TLS1.2 on the second client hello. That's because both peers have already negotiated TLS1.3. This addresses issue with peers which may send a changecipherspec message at this stage, which is now allowed when our version is set to be TLS1.2. Introduced test suite using openssl and resumption using HRR which reproduces the issue. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
| * hello_ext_parse: apply the test for pre-shared key ext being last on client ↵Nikos Mavrogiannopoulos2018-07-251-1/+1
|/ | | | | | | | | | | | | | | | | | hello We were incorrectly insisting on pre-shared key extension being last in both client and server hello. That was incorrect, as only in client hello it is required by TLS1.3 to be last. Quoting: The "pre_shared_key" extension MUST be the last extension in the ClientHello (this facilitates implementation as described below). Servers MUST check that it is the last extension and otherwise fail the handshake with an "illegal_parameter" alert. Resolves #525 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* .gitlab-ci.yml: automatically retry failed jobsNikos Mavrogiannopoulos2018-07-241-0/+17
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
* doc updateNikos Mavrogiannopoulos2018-07-241-0/+10
| | | | Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* allow no certificates to be reported by the ↵Nikos Mavrogiannopoulos2018-07-244-8/+144
| | | | | | | | | | | gnutls_certificate_retrieve_function callbacks In 9829ef9a we introduced a wrapper over the older callback functions which didn't handle this case. Resolves #528 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
* Merge branch 'fix-cert-callbacks' into 'master'Nikos Mavrogiannopoulos2018-07-243-3/+139
|\ | | | | | | | | | | | | cert-cred: fix possible segfault when resetting cert retrieval function Closes #528 See merge request gnutls/gnutls!714
| * cert-cred: fix possible segfault when resetting cert retrieval functionDmitry Eremin-Solenikov2018-07-243-3/+139
|/ | | | | | | | | | Reset get_cert_callback3 callback to NULL if provided callback is NULL. Otherwise after the certificate request call_legacy_cert_cb1 / call_legacy_cert_cb2 will try to unconditionally call legacy_cert_cb1 / legacy_cert_cb2 callback (set to NULL) leading to segfault. Fixes: 9829ef9a3ca06d60472599df7c74ebb9a53f1fe2 Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>