summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'wip/dueno/gitignore' into 'master'1214-implement-channel-bindings-for-tls-1-3Daiki Ueno2021-04-254-13/+10
|\ | | | | | | | | | | | | gnutls_x509_crt_get_dn: clarify null-termination of the output Closes #1191 and #1187 See merge request gnutls/gnutls!1418
| * gnutls_x509_crt_get_dn: clarify null-termination of the outputDaiki Ueno2021-04-251-1/+2
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * build: do not install .hmac filesDaiki Ueno2021-04-251-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | It turned out that distro package building process might perform post-processing (e.g., strip) of the shared libraries after install, and that may cause inconsistency with the installed .hmac files. Let's not try too hard on this but defer the final hmac calculation to distributions. It is still useful to keep our own fipshmac as it makes it easier to run FIPS tests. Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * tests: fix test script file name in distributionDaiki Ueno2021-04-251-1/+1
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * .gitignore: ignore ctags, etags, and GNU global filesDaiki Ueno2021-04-251-0/+7
|/ | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
* Merge branch 'wip/dueno/earlydata' into 'master'Daiki Ueno2021-04-259-83/+176
|\ | | | | | | | | | | | | handshake: fix timing of sending early data Closes #1146 See merge request gnutls/gnutls!1416
| * handshake: fix timing of sending early dataDaiki Ueno2021-04-259-83/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the client was sending early data after receiving a Server Hello message, which not only negates the benefit of 0-RTT, but also was a logic error as it can only be decrypted by the server when the initial handshake and the resuming handshake agree on the same ciphersuites. This fixes that behavior in the following ways: - extend the session data format to include the selected ciphersuites, even in TLS 1.3 - setup the epoch for early data, right before the client sending early data (also right after the server deciding to accept early data). - extend the test case to use different ciphersuites in the initial and resuming handshakes Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | Merge branch 'wip-guile-fixes' into 'master'Daiki Ueno2021-04-252-9/+11
|\ \ | |/ |/| | | | | Minor Guile bindings improvements. See merge request gnutls/gnutls!1413
| * guile: Tests show their PID upon uncaught exceptions.Ludovic Courtès2021-04-241-2/+3
| | | | | | | | | | | | | | * guile/modules/gnutls/build/tests.scm (run-test): Display the PID when throwing an exception. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| * guile: Avoid the deprecated 'scm_t_uint8' type.Ludovic Courtès2021-04-231-4/+4
| | | | | | | | | | | | | | * guile/src/core.c: Use 'uint8_t' instead of 'scm_t_uint8', which is deprecated in Guile 3.0. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| * guile: Avoid potentially missed reference.Ludovic Courtès2021-04-231-3/+5
| | | | | | | | | | | | | | | | | | | | | | There's one case where 'register_weak_reference' is called several times on the same object, in 'set-certificate-credentials-x509-keys!', where PRIVKEY could have been GC'd before CRED. * guile/src/core.c (register_weak_reference): Add TO to the weak references of FROM instead of overriding them. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| * guile: Remove leftover comment about allocation routines.Ludovic Courtès2021-04-231-1/+0
| | | | | | | | | | | | | | | | This is a followup to 872409857351f28b1e3c21526bfa6606c918b176. * guile/src/core.c (scm_init_gnutls): Remove leftover comment. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* | Merge branch 'wip/dueno/hash-copy-selftests' into 'master'Daiki Ueno2021-04-231-4/+8
|\ \ | | | | | | | | | | | | crypto-selftests: tolerate errors of gnutls_{hash,hmac}_copy See merge request gnutls/gnutls!1412
| * | crypto-selftests: tolerate errors of gnutls_{hash,hmac}_copyDaiki Ueno2021-04-231-4/+8
| |/ | | | | | | | | | | | | | | | | Some hardware accelerated implementations, such as afalg, cannot support the copy operation. This patch turns it a soft-error, as the code below is already checking if the copy is non-NULL, before performing any operation on it. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | Merge branch 'wip/dueno/afalg-fixes' into 'master'Daiki Ueno2021-04-234-22/+35
|\ \ | |/ |/| | | | | | | | | afalg: minor follow-up fixes Closes #1209 and #1207 See merge request gnutls/gnutls!1414
| * afalg: use pkg-config to detect libkcapiDaiki Ueno2021-04-232-1/+5
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * afalg: support AES-XTS algorithmsDaiki Ueno2021-04-231-0/+2
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * afalg: cleanup header inclusionDaiki Ueno2021-04-231-7/+7
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * afalg: remove unnecessary initializationDaiki Ueno2021-04-231-13/+12
| | | | | | | | | | | | | | That would make it easier to spot any uninitialized memory access with valgrind. Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * afalg: assert IV size returned from the kernel is in the rangeDaiki Ueno2021-04-231-2/+6
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * NEWS: mention AF_ALG supportDaiki Ueno2021-04-231-0/+4
|/ | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
* Merge branch 'wip/dueno/hrr-session-id' into 'master'Daiki Ueno2021-04-232-9/+31
|\ | | | | | | | | | | | | handshake: don't regenerate legacy_session_id in second CH after HRR Closes #1210 See merge request gnutls/gnutls!1411
| * handshake: don't regenerate legacy_session_id in second CH after HRRDaiki Ueno2021-04-222-9/+31
|/ | | | | | | | According to RFC 8446 4.1.2, the client must send the same Client Hello after Hello Retry Request, except for the certain extensions, and thus legacy_session_id must be preserved. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* Merge branch 'af_alg' into 'master'Daiki Ueno2021-04-208-4/+887
|\ | | | | | | | | Add Linux kernel AF_ALG backend See merge request gnutls/gnutls!1404
| * _gnutls_cipher_init: fallback if setiv is not implemented for AEADDaiki Ueno2021-04-201-1/+8
| | | | | | | | | | | | | | | | The _gnutls_cipher_init function currently assumes that all the cipher implementations have .setiv method. This is not the case for AEAD-only implementations such as afalg. Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * Add AF_ALG accelerationStephan Mueller2021-04-207-3/+879
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch set adds the backend implementation to use the Linux kernel crypto API via the AF_ALG interface. The GnuTLS AF_ALG extension uses libkcapi [1] as the backend library which implements the actual kernel communication. [1] http://www.chronox.de/libkcapi.html The symmetric cipher support, the hashing and the MAC support are validated to work correctly using NIST CAVS test vectors. The AEAD cipher support was tested by connecting to a remote host using gnutls-cli (the following log strips out unrelated information): Processed 143 CA certificate(s). ... - Certificate type: X.509 - Got a certificate list of 1 certificates. - Certificate[0] info: ... - Description: (TLS1.2)-(ECDHE-SECP384R1)-(RSA-SHA512)-(AES-256-GCM) - Session ID: 9E:5E:FC:09:2A:4E:2A:3D:22:44:68:42:C3:F6:2D:AB:F9:67:08:CE:6D:EE:E4:A2:EF:80:43:FE:3B:D9:1E:FE - Ephemeral EC Diffie-Hellman parameters - Using curve: SECP384R1 - Curve size: 384 bits - Version: TLS1.2 - Key Exchange: ECDHE-RSA - Server Signature: RSA-SHA512 - Cipher: AES-256-GCM - MAC: AEAD - Options: extended master secret, safe renegotiation, - Handshake was completed - Simple Client Mode: Signed-off-by: Stephan Mueller <smueller@chronox.de> Co-authored-by: Daiki Ueno <ueno@gnu.org> Co-authored-by: Hedgehog5040 <krenzelok.frantisek@gmail.com>
* | Merge branch 'wip/dueno/tls13-compat' into 'master'Daiki Ueno2021-04-1810-11/+179
|\ \ | |/ |/| | | | | | | | | priority: add option to disable TLS 1.3 middlebox compatibility mode Closes #1208 See merge request gnutls/gnutls!1410
| * priority: add option to disable TLS 1.3 middlebox compatibility modeDaiki Ueno2021-04-1710-11/+179
|/ | | | | | | This adds a new option %DISABLE_TLS13_COMPAT_MODE to disable TLS 1.3 compatibility mode at run-time. Signed-off-by: Daiki Ueno <ueno@gnu.org>
* Merge branch 'wip/dueno/reallocarray' into 'master'Daiki Ueno2021-03-3017-102/+219
|\ | | | | | | | | | | | | build: avoid potential integer overflow in array allocation Closes #1179 See merge request gnutls/gnutls!1392
| * _gnutls_calloc: remove unused functionDaiki Ueno2021-03-302-12/+0
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * build: avoid integer overflow in additionsDaiki Ueno2021-03-299-5/+99
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * build: avoid potential integer overflow in array allocationDaiki Ueno2021-03-2914-81/+90
| | | | | | | | | | | | | | | | This relies on _gnutls_reallocarray for all occasions of array allocations, so that they can benefit from the built-in overflow checks. Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * pkcs11x: find_ext_cb: fix error propagationDaiki Ueno2021-03-291-2/+1
| | | | | | | | | | | | Use explicit error value, as rv is not set in this code path. Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * mem: add _gnutls_reallocarray and _gnutls_reallocarray_fastDaiki Ueno2021-03-292-2/+29
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * bootstrap: pull in 'xalloc-oversized' module from GnulibDaiki Ueno2021-03-291-1/+1
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | Merge branch 'wip/dueno/system-keys-w32' into 'master'Daiki Ueno2021-03-291-1/+2
|\ \ | | | | | | | | | | | | | | | | | | keys-win: free certificate context in gnutls_system_key_iter_deinit Closes #1197 See merge request gnutls/gnutls!1406
| * | keys-win: free certificate context in gnutls_system_key_iter_deinitDaiki Ueno2021-03-291-1/+2
| |/ | | | | | | | | | | | | Suggested by Bjørn Christensen in: https://gitlab.com/gnutls/gnutls/-/issues/1197 Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | Merge branch 'tmp-missing-gnutls-crypto-layers_png' into 'master'Andreas Metzler2021-03-201-0/+1
|\ \ | |/ |/| | | | | build: doc: install missing image file gnutls-crypto-layers.png See merge request gnutls/gnutls!1405
| * build: doc: install missing image file gnutls-crypto-layers.pngAndreas Metzler2021-03-201-0/+1
|/ | | | Signed-off-by: Andreas Metzler <ametzler@bebt.de>
* Merge branch 'wip/dueno/coverity' into 'master'Daiki Ueno2021-03-165-7/+36
|\ | | | | | | | | Fix resource leaks spotted by coverity See merge request gnutls/gnutls!1403
| * examples: avoid memory leak in ex-verifyDaiki Ueno2021-03-151-1/+6
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * examples: avoid memory leak in tlsproxyDaiki Ueno2021-03-151-0/+8
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * src: avoid file descriptor leak in socket_open2Daiki Ueno2021-03-151-1/+8
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * gnutls-cli-debug: avoid resource leak in saving DHE paramsDaiki Ueno2021-03-151-3/+12
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
| * srptool: avoid FILE pointer leak on errorDaiki Ueno2021-03-151-2/+2
| | | | | | | | Signed-off-by: Daiki Ueno <ueno@gnu.org>
* | Merge branch 'wip/dueno/tzalloc-tests' into 'master'Daiki Ueno2021-03-152-10/+12
|\ \ | |/ |/| | | | | | | | | gnulib: update git submodule Closes #1190 See merge request gnutls/gnutls!1402
| * gnulib: update git submoduleDaiki Ueno2021-03-152-10/+12
|/ | | | | | | | This brings in the fix for parse-datetime test failures on NetBSD: https://lists.gnu.org/archive/html/bug-gnulib/2021-03/msg00069.html https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=35f8ff2e1162bf3ee60d99b6812f2ae10f3f2898 Signed-off-by: Daiki Ueno <ueno@gnu.org>
* Merge branch 'oneshot-urandom' into 'master'Daiki Ueno2021-03-119-81/+24
|\ | | | | | | | | | | | | sysrng-linux: re-open /dev/urandom every time Closes #1188 See merge request gnutls/gnutls!1396
| * lib/nettle: get rid of _rnd_system_entropy_checkAlexander Sosedkin2021-03-087-28/+0
| | | | | | | | Signed-off-by: Alexander Sosedkin <asosedkin@redhat.com>
| * lib/global: don't call now-noop _gnutls_rnd_checkAlexander Sosedkin2021-03-082-15/+0
| | | | | | | | Signed-off-by: Alexander Sosedkin <asosedkin@redhat.com>