summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* Merge branch 'misc-fixes' into 'master'Tim Rühsen2018-07-233-64/+41
|\ | | | | | | | | Few small patches See merge request gnutls/gnutls!715
| * kx: for uniformity print master secret sizeDmitry Eremin-Solenikov2018-07-231-1/+2
| | | | | | | | | | | | | | | | During keys setup phase debug log will contain sizes of all keys and secrets, except master secret. Dump MS length (48) to log for uniformity. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * constate: dump full key block to logDmitry Eremin-Solenikov2018-07-231-1/+2
| | | | | | | | | | | | Include full key block to the debug log. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * constate: dump MAC keys to debug logDmitry Eremin-Solenikov2018-07-231-0/+12
| | | | | | | | | | | | | | _gnutls_set_keys() can dump client/server write keys/ivs to debug log, but it skips MAC keys. Add MAC keys to log. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
| * constate: drop unused variable in _gnutls_set_keysDmitry Eremin-Solenikov2018-07-231-7/+0
| | | | | | | | | | | | | | | | | | _gnutls_set_keys() creates rrnd as client random + server random, but does not use it (it was used before for export key generation, but was not removed when dropping support for export cipher suites). Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Fixes: 8bdb8d53aa5b4c5d04255b6c9b5f2dac8b23d51b
| * cert auth: simplify certificate selection codeDmitry Eremin-Solenikov2018-07-231-55/+25
|/ | | | | | | Merge pubkey_is_compat_with_cs() and select_sign_algorithm() functions to ease extension of certificate selection code. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
* Merge branch 'tmp-fix-521' into 'master'Nikos Mavrogiannopoulos2018-07-223-12/+23
|\ | | | | | | | | Remove trailing dot from hostname input See merge request gnutls/gnutls!709
| * Remove trailing dot from hostname inputTim Rühsen2018-07-223-12/+23
|/ | | | | | Fixes #532 Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
* Merge branch 'tmp-fix-pkcs8-export' into 'master'Nikos Mavrogiannopoulos2018-07-205-5/+321
|\ | | | | | | | | | | | | Addressed issue with ECDSA key export under PKCS#8 Closes #516 See merge request gnutls/gnutls!707
| * gnutls_x509_privkey_import_ecc_raw: encode parameters on importtmp-fix-pkcs8-exportNikos Mavrogiannopoulos2018-07-205-5/+321
|/ | | | | | | | | | | | | That makes the structure fully usable after import. In _encode_privkey() use the lower-level _gnutls_x509_export_int2() for key encoding as the call to higher gnutls_x509_privkey_export2() could result to an infinite recursion when keys are incomplete. Introduced additional tests for PKCS#8 key import and export. Resolves: #516 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>