]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
10 months agoMerge branch 'wip/dueno/mldsa-followup3' into 'master'
Daiki Ueno [Fri, 4 Jul 2025 12:13:16 +0000 (21:13 +0900)] 
Merge branch 'wip/dueno/mldsa-followup3' into 'master'

x509: support encoding of ML-DSA private keys in CHOICE format

Closes #1665

See merge request gnutls/gnutls!1973

10 months agoMerge branch 'wip/dueno/mldsa-tls-fixes' into 'master'
Daiki Ueno [Fri, 4 Jul 2025 09:35:54 +0000 (18:35 +0900)] 
Merge branch 'wip/dueno/mldsa-tls-fixes' into 'master'

algorithms: assign hash strength to ML-DSA signature algorithms

See merge request gnutls/gnutls!1974

10 months agotests: allow ML-DSA tests under valgrind
Daiki Ueno [Fri, 4 Jul 2025 07:56:22 +0000 (16:56 +0900)] 
tests: allow ML-DSA tests under valgrind

Signed-off-by: Daiki Ueno <ueno@gnu.org>
10 months agox509: fix memleaks after ML-DSA key consistency check
Daiki Ueno [Fri, 4 Jul 2025 07:55:21 +0000 (16:55 +0900)] 
x509: fix memleaks after ML-DSA key consistency check

Signed-off-by: Daiki Ueno <ueno@gnu.org>
10 months agocerttool: don't print bits when inspecting ML-DSA private keys
Daiki Ueno [Fri, 4 Jul 2025 05:52:08 +0000 (14:52 +0900)] 
certtool: don't print bits when inspecting ML-DSA private keys

Signed-off-by: Daiki Ueno <ueno@gnu.org>
10 months agoNEWS: mention ML-DSA improvements
Daiki Ueno [Fri, 4 Jul 2025 03:59:29 +0000 (12:59 +0900)] 
NEWS: mention ML-DSA improvements

Signed-off-by: Daiki Ueno <ueno@gnu.org>
10 months agotests: add round-trip test of ML-DSA keys
Daiki Ueno [Fri, 4 Jul 2025 03:46:13 +0000 (12:46 +0900)] 
tests: add round-trip test of ML-DSA keys

Signed-off-by: Daiki Ueno <ueno@gnu.org>
10 months agopk: fix memleak when ML-DSA seed is stored
Daiki Ueno [Fri, 4 Jul 2025 03:23:59 +0000 (12:23 +0900)] 
pk: fix memleak when ML-DSA seed is stored

Signed-off-by: Daiki Ueno <ueno@gnu.org>
10 months agocerttool: add --key-format option to select ML-DSA key format
Daiki Ueno [Thu, 3 Jul 2025 07:09:12 +0000 (16:09 +0900)] 
certtool: add --key-format option to select ML-DSA key format

This adds the --key-format option to certtool to control the ML-DSA
private key format. The possible values are, "seed", "expanded", or
"both".

Signed-off-by: Daiki Ueno <ueno@gnu.org>
10 months agox509: support encoding of ML-DSA private keys in CHOICE format
Daiki Ueno [Thu, 3 Jul 2025 07:08:20 +0000 (16:08 +0900)] 
x509: support encoding of ML-DSA private keys in CHOICE format

This enables to encode a generaeted ML-DSA private key in the three
formats defined in draft-ietf-lamps-dilithium-certificates-12,
indicated with the gnutls_pkcs_encrypt_flags_t enum as
GNUTLS_PKCS_MLDSA_SEED and/or GNUTLS_PKCS_MLDSA_EXPANDED values.  The
default format ML-DSA keys has been changed to the "both" format.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
10 months agoalgorithms: assign hash strength to ML-DSA signature algorithms
Daiki Ueno [Fri, 4 Jul 2025 06:37:08 +0000 (15:37 +0900)] 
algorithms: assign hash strength to ML-DSA signature algorithms

The _gnutls_sign_get_hash_strength function previously returned 0 for
ML-DSA algorithms, preventing the security level check in certificate
signatures. This assigns the collision strength for commitment hashes,
as defined in FIPS 204, section 4, table 1.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
10 months agonettle: always generate ML-DSA seed and keys separately
Daiki Ueno [Thu, 3 Jul 2025 03:09:03 +0000 (12:09 +0900)] 
nettle: always generate ML-DSA seed and keys separately

When generating ML-DSA, store the intermediate seed, so it can be
exported later.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
10 months agoMerge branch 'wip/dueno/mldsa-followup2' into 'master'
Daiki Ueno [Thu, 3 Jul 2025 21:14:18 +0000 (06:14 +0900)] 
Merge branch 'wip/dueno/mldsa-followup2' into 'master'

x509: support decoding of ML-DSA private keys in CHOICE format

See merge request gnutls/gnutls!1972

11 months ago.gitlab-ci.yml: disable ChaCha20Poly1305 in leancrypto compilation
Daiki Ueno [Wed, 2 Jul 2025 23:23:36 +0000 (08:23 +0900)] 
.gitlab-ci.yml: disable ChaCha20Poly1305 in leancrypto compilation

Signed-off-by: Daiki Ueno <ueno@gnu.org>
11 months agox509: support decoding of ML-DSA private keys in CHOICE format
Daiki Ueno [Tue, 1 Jul 2025 08:57:03 +0000 (17:57 +0900)] 
x509: support decoding of ML-DSA private keys in CHOICE format

This extends the acceptable formats of ML-DSA private keys to the
three formats defined in draft-ietf-lamps-dilithium-certificates-12,
section 6, namely: "seed", "expandedKey", and "both". The legacy
format compatible with liboqs/oqsprovider is still accepted and the
default output format for now.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
11 months agoMerge branch 'keyword-typo' into 'master'
Daiki Ueno [Thu, 3 Jul 2025 00:07:31 +0000 (09:07 +0900)] 
Merge branch 'keyword-typo' into 'master'

doc: fix typo in docs about system profile fallback

See merge request gnutls/gnutls!1971

11 months agopk: plumb key generation from seed
Daiki Ueno [Tue, 1 Jul 2025 05:04:25 +0000 (14:04 +0900)] 
pk: plumb key generation from seed

Signed-off-by: Daiki Ueno <ueno@gnu.org>
11 months agoMerge branch 'patch13' into 'master'
Daiki Ueno [Tue, 1 Jul 2025 14:45:08 +0000 (23:45 +0900)] 
Merge branch 'patch13' into 'master'

src/danetool.c: Free str on error to avoid memory leak

See merge request gnutls/gnutls!1963

11 months agosrc/danetool.c: Use gnutls_hex_encode2() instead of gnutls_hex_encode() to avoid...
Jiasheng Jiang [Tue, 1 Jul 2025 14:45:08 +0000 (14:45 +0000)] 
src/danetool.c: Use gnutls_hex_encode2() instead of gnutls_hex_encode() to avoid memory leak

Fixes: ead5d40a ("danetool: added option to print the raw entries.")
Signed-off-by: Jiasheng Jiang <jiashengjiangcool@gmail.com>
11 months agodoc: fix typo in docs about system profile fallback
Daniel P. Berrangé [Tue, 1 Jul 2025 14:34:58 +0000 (15:34 +0100)] 
doc: fix typo in docs about system profile fallback

Docs for the system profile fallback syntax accidentally repeated
the "@" marker before each keyword. The "@" marker only indicates
the start of the profile field, and individual names are merely
separated by a comma, per the impl in 6b6d9dd44e.

Fixes 6f425b0fd7d860e9d78b7ba0d9c4d3165d824d7c
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
11 months agopubkey: fix byte/bit confusion in public key sizes of ML-DSA
Daiki Ueno [Tue, 1 Jul 2025 03:17:29 +0000 (12:17 +0900)] 
pubkey: fix byte/bit confusion in public key sizes of ML-DSA

Signed-off-by: Daiki Ueno <ueno@gnu.org>
11 months agoMerge branch 'hughsie-issue-1719' into 'master'
Daiki Ueno [Mon, 30 Jun 2025 02:59:33 +0000 (11:59 +0900)] 
Merge branch 'hughsie-issue-1719' into 'master'

algorithms: map GNUTLS_MAC_SHAKE_{128,256} to GNUTLS_DIG_SHAKE_{128,256}

Closes #1719

See merge request gnutls/gnutls!1970

11 months agoalgorithms: map GNUTLS_MAC_SHAKE_{128,256} to GNUTLS_DIG_SHAKE_{128,256}
Richard Hughes [Fri, 27 Jun 2025 15:33:37 +0000 (16:33 +0100)] 
algorithms: map GNUTLS_MAC_SHAKE_{128,256} to GNUTLS_DIG_SHAKE_{128,256}

Fixes https://gitlab.com/gnutls/gnutls/-/issues/1719

Signed-off-by: Richard Hughes <richard@hughsie.com>
11 months agoMerge branch 'patch1' into 'master'
Daiki Ueno [Mon, 16 Jun 2025 05:25:23 +0000 (14:25 +0900)] 
Merge branch 'patch1' into 'master'

lib/accelerated/aarch64/hmac-sha-aarch64.c: Add gnutls_free() to avoid memory leak

See merge request gnutls/gnutls!1951

11 months agolib/accelerated/aarch64/hmac-sha-aarch64.c: Add gnutls_free() to avoid memory leak
Jiasheng Jiang [Mon, 16 Jun 2025 05:25:22 +0000 (05:25 +0000)] 
lib/accelerated/aarch64/hmac-sha-aarch64.c: Add gnutls_free() to avoid memory leak

Add gnutls_free() to free ctx if _hmac_ctx_init() fails to avoid memory leak.

Fixes: d92c73de3 ("Added HMAC-SHA* optimizations for aarch64")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
11 months agoMerge branch 'patch2' into 'master'
Daiki Ueno [Mon, 16 Jun 2025 05:24:51 +0000 (14:24 +0900)] 
Merge branch 'patch2' into 'master'

lib/accelerated/x86/hmac-x86-ssse3.c: Add gnutls_free() to avoid memory leak

See merge request gnutls/gnutls!1952

11 months agolib/accelerated/x86/hmac-x86-ssse3.c: Add gnutls_free() to avoid memory leak
Jiasheng Jiang [Mon, 16 Jun 2025 05:24:51 +0000 (05:24 +0000)] 
lib/accelerated/x86/hmac-x86-ssse3.c: Add gnutls_free() to avoid memory leak

Add gnutls_free() to free ctx if _hmac_ctx_init() fails to avoid memory leak.

Fixes: cbb9b17ff ("Added Appro's SSSE3 SHA implementations")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
11 months agoMerge branch 'patch3' into 'master'
Daiki Ueno [Mon, 16 Jun 2025 05:24:15 +0000 (14:24 +0900)] 
Merge branch 'patch3' into 'master'

lib/accelerated/x86/hmac-padlock.c: Add gnutls_free() to avoid memory leak

See merge request gnutls/gnutls!1953

11 months agolib/accelerated/x86/hmac-padlock.c: Add gnutls_free() to avoid memory leak
Jiasheng Jiang [Mon, 16 Jun 2025 05:24:14 +0000 (05:24 +0000)] 
lib/accelerated/x86/hmac-padlock.c: Add gnutls_free() to avoid memory leak

Add gnutls_free() to free ctx if _hmac_ctx_init() fails to avoid memory leak.

Fixes: 38a089b67 ("Updates for padlock hashes in C7 nano. Requires a part of nettle to be included.")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
11 months agoMerge branch 'patch7' into 'master'
Daiki Ueno [Mon, 16 Jun 2025 05:22:53 +0000 (14:22 +0900)] 
Merge branch 'patch7' into 'master'

lib/accelerated/x86/sha-padlock.c: Free ctx on error to avoid memory leak

See merge request gnutls/gnutls!1957

11 months agolib/accelerated/x86/sha-padlock.c: Free ctx on error to avoid memory leak
Jiasheng Jiang [Mon, 16 Jun 2025 05:22:53 +0000 (05:22 +0000)] 
lib/accelerated/x86/sha-padlock.c: Free ctx on error to avoid memory leak

Call gnutls_free() to release ctx if _ctx_init() fails, preventing a memory leak.

Fixes: 38a089b67 ("Updates for padlock hashes in C7 nano. Requires a part of nettle to be included.")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
11 months agoMerge branch 'patch9' into 'master'
Daiki Ueno [Mon, 16 Jun 2025 05:22:12 +0000 (14:22 +0900)] 
Merge branch 'patch9' into 'master'

lib/accelerated/x86/sha-x86-ssse3.c: Free ctx on error to avoid memory leak

See merge request gnutls/gnutls!1959

11 months agolib/accelerated/x86/sha-x86-ssse3.c: Free ctx on error to avoid memory leak
Jiasheng Jiang [Mon, 16 Jun 2025 05:22:12 +0000 (05:22 +0000)] 
lib/accelerated/x86/sha-x86-ssse3.c: Free ctx on error to avoid memory leak

Call gnutls_free() to release ctx if _ctx_init() fails, preventing a memory leak.

Fixes: cbb9b17ff ("Added Appro's SSSE3 SHA implementations")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
11 months agoMerge branch 'patch12' into 'master'
Daiki Ueno [Mon, 16 Jun 2025 05:21:09 +0000 (14:21 +0900)] 
Merge branch 'patch12' into 'master'

lib/pk.c: Free tmp_output on error to avoid memory leak

See merge request gnutls/gnutls!1962

11 months agolib/pk.c: Free tmp_output on error to avoid memory leak
Jiasheng Jiang [Mon, 16 Jun 2025 05:21:09 +0000 (05:21 +0000)] 
lib/pk.c: Free tmp_output on error to avoid memory leak

Call gnutls_free() to release tmp_output if asn1_der_coding() fails, preventing memory leak.

Fixes: 6f9bfaac9 ("Use the PKCS #1 1.5 encoding provided by nettle (2.5) for encryption and signatures.")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
11 months agoMerge branch 'patch11' into 'master'
Daiki Ueno [Mon, 16 Jun 2025 05:19:45 +0000 (14:19 +0900)] 
Merge branch 'patch11' into 'master'

lib/accelerated/x86/sha-x86-ssse3.c: Free ctx on error to avoid memory leak

See merge request gnutls/gnutls!1961

11 months agolib/accelerated/x86/sha-x86-ssse3.c: Free ctx on error to avoid memory leak
Jiasheng Jiang [Mon, 16 Jun 2025 05:19:45 +0000 (05:19 +0000)] 
lib/accelerated/x86/sha-x86-ssse3.c: Free ctx on error to avoid memory leak

Call gnutls_free() to release ctx if _ctx_init() fails, preventing a memory leak.

Fixes: 0be469e51 ("Imported Andy Polyakov's implementations for SHA* in aarch64")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
11 months agoMerge branch 'zfridric_devel' into 'master'
Zoltán Fridrich [Tue, 10 Jun 2025 15:02:53 +0000 (15:02 +0000)] 
Merge branch 'zfridric_devel' into 'master'

Add pkcs11 provider

See merge request gnutls/gnutls!1808

11 months agoPKCS#11 provider: add tests
Zoltan Fridrich [Thu, 20 Feb 2025 15:01:02 +0000 (16:01 +0100)] 
PKCS#11 provider: add tests

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
11 months agoPKCS#11 provider: add support for MAC algorithms
Zoltan Fridrich [Thu, 16 Jan 2025 14:21:35 +0000 (15:21 +0100)] 
PKCS#11 provider: add support for MAC algorithms

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
11 months agoPKCS#11 provider: add support for pk algorithms
Zoltan Fridrich [Thu, 16 Jan 2025 14:09:20 +0000 (15:09 +0100)] 
PKCS#11 provider: add support for pk algorithms

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
11 months agoPKCS#11 provider: add support for ciphers
Zoltan Fridrich [Thu, 16 Jan 2025 14:00:44 +0000 (15:00 +0100)] 
PKCS#11 provider: add support for ciphers

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
11 months agoAdd support for multiple crypto backends
Zoltan Fridrich [Thu, 16 Jan 2025 13:41:40 +0000 (14:41 +0100)] 
Add support for multiple crypto backends

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
11 months agoAdd pkcs11 provider
Zoltan Fridrich [Thu, 16 Jan 2025 12:32:16 +0000 (13:32 +0100)] 
Add pkcs11 provider

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
12 months agoMerge branch 'zfridric_devel2' into 'master'
Zoltán Fridrich [Wed, 14 May 2025 08:27:26 +0000 (08:27 +0000)] 
Merge branch 'zfridric_devel2' into 'master'

Add configuration option for certificate compression algorithms

Closes #1423

See merge request gnutls/gnutls!1950

12 months agoAdd configuration option for certificate compression algorithms
Zoltan Fridrich [Tue, 6 May 2025 13:54:00 +0000 (15:54 +0200)] 
Add configuration option for certificate compression algorithms

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
13 months agoMerge branch 'wip/dueno/hash' into 'master'
Daiki Ueno [Tue, 22 Apr 2025 22:40:48 +0000 (07:40 +0900)] 
Merge branch 'wip/dueno/hash' into 'master'

gnulib: stop using "hash" module

Closes #1703

See merge request gnutls/gnutls!1949

13 months agognulib: stop using "hash" module
Daiki Ueno [Tue, 22 Apr 2025 06:39:46 +0000 (15:39 +0900)] 
gnulib: stop using "hash" module

To minimize the number of dependencies on Gnulib, this migrates the
uses of the "hash" module to gl_linkedhash_list, which we extensively
use as a generic hash-table.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
13 months agoMerge branch 'wip/clean-fips' into 'master'
Daiki Ueno [Mon, 14 Apr 2025 01:04:21 +0000 (10:04 +0900)] 
Merge branch 'wip/clean-fips' into 'master'

fips: remove duplicate _gnutls_switch_lib_state declaration breaking inline linkage in clang -O0

Closes #1690

See merge request gnutls/gnutls!1948

13 months agofips: remove duplicate _gnutls_switch_lib_state declaration breaking inline linkage...
Doekin [Fri, 11 Apr 2025 12:09:00 +0000 (20:09 +0800)] 
fips: remove duplicate _gnutls_switch_lib_state declaration breaking inline linkage in clang -O0

Signed-off-by: Chan Lee <Leetimemp@gmail.com>
13 months agoMerge branch 'ml-dsa-not-approved' into 'master'
Alexander Sosedkin [Mon, 7 Apr 2025 11:17:51 +0000 (11:17 +0000)] 
Merge branch 'ml-dsa-not-approved' into 'master'

mark ML-DSA as FIPS-unapproved, enable FIPS+leancrypto in CI

See merge request gnutls/gnutls!1945

13 months ago.gitlab-ci.yml: enable building/testing with leancrypto in FIPS mode
Alexander Sosedkin [Thu, 27 Mar 2025 11:52:15 +0000 (12:52 +0100)] 
.gitlab-ci.yml: enable building/testing with leancrypto in FIPS mode

Signed-off-by: Alexander Sosedkin <asosedkin@redhat.com>
13 months agonettle/pk: mark ML-DSA as FIPS-unapproved
Alexander Sosedkin [Thu, 3 Apr 2025 10:39:39 +0000 (12:39 +0200)] 
nettle/pk: mark ML-DSA as FIPS-unapproved

* public key validation should ideally be performed within gnutls,
  not inside the back-end
* ML-DSA needs a self-test (FIPS 140-3 IG 10.3.A)

Signed-off-by: Alexander Sosedkin <asosedkin@redhat.com>
14 months agoMerge branch 'ddudas/enable-tls-mldsa' into 'master'
Daiki Ueno [Wed, 2 Apr 2025 21:57:28 +0000 (06:57 +0900)] 
Merge branch 'ddudas/enable-tls-mldsa' into 'master'

Enable MLDSA at TLS 1.3 level

See merge request gnutls/gnutls!1938

14 months agoTLS1.3 sig filter out signature algorithms in CR
d-Dudas [Wed, 2 Apr 2025 12:01:13 +0000 (15:01 +0300)] 
TLS1.3 sig filter out signature algorithms in CR

Patch from @dueno

Signed-off-by: David Dudas <david.dudas03@e-uvt.ro>
14 months agoAdded TLS1.3 MLDSA tests.
d-Dudas [Thu, 13 Mar 2025 22:02:35 +0000 (22:02 +0000)] 
Added TLS1.3 MLDSA tests.

Signed-off-by: David Dudas <david.dudas03@e-uvt.ro>
14 months agoList MLDSA algorithms first in the priority array.
d-Dudas [Tue, 4 Mar 2025 18:57:40 +0000 (20:57 +0200)] 
List MLDSA algorithms first in the priority array.

Signed-off-by: David Dudas <david.dudas03@e-uvt.ro>
14 months ago[Experimental] Enable MLDSA at TLS 1.3 level
David Dudas [Fri, 28 Feb 2025 15:37:27 +0000 (15:37 +0000)] 
[Experimental] Enable MLDSA at TLS 1.3 level

Signed-off-by: David Dudas <david.dudas03@e-uvt.ro>
14 months agoMerge branch 'ktls-keyupdate-support' into 'master'
František Krenželok [Fri, 28 Mar 2025 11:52:58 +0000 (11:52 +0000)] 
Merge branch 'ktls-keyupdate-support' into 'master'

kTLS: keyupdate refresh

See merge request gnutls/gnutls!1934

14 months agotests: add enviromental variable
Krenzelok Frantisek [Mon, 17 Mar 2025 11:41:24 +0000 (12:41 +0100)] 
tests: add  enviromental variable

Signed-off-by: Krenzelok Frantisek <krenzelok.frantisek@gmail.com>
14 months agokTLS: fix gnutls-cli-debug - test
Krenzelok Frantisek [Tue, 11 Mar 2025 10:38:47 +0000 (11:38 +0100)] 
kTLS: fix gnutls-cli-debug - test

Signed-off-by: Krenzelok Frantisek <krenzelok.frantisek@gmail.com>
14 months agokTLS: improve alert messages
Krenzelok Frantisek [Tue, 11 Mar 2025 10:37:33 +0000 (11:37 +0100)] 
kTLS: improve alert messages

Signed-off-by: Krenzelok Frantisek <krenzelok.frantisek@gmail.com>
14 months agokTLS: add rekey kernel version check (Linux)
Krenzelok Frantisek [Mon, 17 Feb 2025 22:08:57 +0000 (23:08 +0100)] 
kTLS: add rekey kernel version check (Linux)

Signed-off-by: Krenzelok Frantisek <krenzelok.frantisek@gmail.com>
14 months agokTLS: Document rekey support
Krenzelok Frantisek [Mon, 17 Feb 2025 22:05:28 +0000 (23:05 +0100)] 
kTLS: Document rekey support

Signed-off-by: Krenzelok Frantisek <krenzelok.frantisek@gmail.com>
14 months agokTLS: add new keyupdate error return on recv
Frantisek Krenzelok [Tue, 11 Feb 2025 12:35:43 +0000 (13:35 +0100)] 
kTLS: add new keyupdate error return on recv

kTLS now returns -EKEYEXPIRED when the socket's keys aren't updated after
receiving a keyupdate (this is very unlikely). Currently when this
happens the ktls recv funtion returns GNUTLS_E_AGAIN and the receive
function is called again and again.

Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
14 months agokTLS: keyupdate_test improvements
Frantisek Krenzelok [Tue, 11 Feb 2025 11:45:44 +0000 (12:45 +0100)] 
kTLS: keyupdate_test improvements

- ktls_utils.h has helper funtion to create standard sockets required
  for ktls support testing.
- key_update test for kTLS is now a flavourt of the tls13/key_update
  test instead of being standalone(broadens the testing cases).
- gnutls_ktls.c now uses the aformentioned ktls_utils.h

Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
14 months agoMerge branch 'wip/dueno/remove-liboqs' into 'master'
Daiki Ueno [Wed, 26 Mar 2025 23:20:08 +0000 (08:20 +0900)] 
Merge branch 'wip/dueno/remove-liboqs' into 'master'

build: remove support for liboqs

Closes #1649

See merge request gnutls/gnutls!1940

14 months agobuild: remove support for liboqs
Daiki Ueno [Sun, 16 Mar 2025 02:39:31 +0000 (11:39 +0900)] 
build: remove support for liboqs

Signed-off-by: Daiki Ueno <ueno@gnu.org>
14 months agoMerge branch 'fips/sha1_sigver_disable' into 'master'
Daiki Ueno [Wed, 26 Mar 2025 08:49:14 +0000 (17:49 +0900)] 
Merge branch 'fips/sha1_sigver_disable' into 'master'

fips: mark sha1 as not approved for SigVer in FIPS mode

See merge request gnutls/gnutls!1900

14 months agoSHA-1 cannot be CAVP tested anymore. Thus, Mark it as not approved for signature...
Angel Yankov [Thu, 28 Nov 2024 09:02:07 +0000 (11:02 +0200)] 
SHA-1 cannot be CAVP tested anymore. Thus, Mark it as not approved for signature verification.

Signed-off-by: Angel Yankov <angel.yankov@suse.com>
14 months agoMerge branch 'wip/dueno/nst-data' into 'master'
Daiki Ueno [Tue, 25 Mar 2025 22:18:57 +0000 (07:18 +0900)] 
Merge branch 'wip/dueno/nst-data' into 'master'

serv: fix detection of early data reception

Closes #1667

See merge request gnutls/gnutls!1941

14 months agoMerge branch 'wip/dueno/lc-init' into 'master'
Daiki Ueno [Tue, 25 Mar 2025 13:40:56 +0000 (22:40 +0900)] 
Merge branch 'wip/dueno/lc-init' into 'master'

global: call lc_init at startup

See merge request gnutls/gnutls!1942

14 months agotests: add basic tests for 0-RTT with gnutls-serv and gnutls-cli
Daiki Ueno [Sun, 16 Feb 2025 00:04:50 +0000 (09:04 +0900)] 
tests: add basic tests for 0-RTT with gnutls-serv and gnutls-cli

Signed-off-by: Daiki Ueno <ueno@gnu.org>
14 months agocli: send early data only after session data is set
Daiki Ueno [Mon, 17 Mar 2025 00:00:44 +0000 (09:00 +0900)] 
cli: send early data only after session data is set

Now that max_early_data_size is recorded as part of the stored
resumption data, this needs to be read before attempting to send early
data.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
14 months agoserv: fix detection of early data reception
Daiki Ueno [Sun, 16 Feb 2025 00:02:46 +0000 (09:02 +0900)] 
serv: fix detection of early data reception

Upon success, gnutls_record_recv_early_data returns the amount of data
received, so the application should treat positive numbers as an
indication of early data reception.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
14 months agoglobal: call lc_init at startup
Daiki Ueno [Wed, 19 Mar 2025 09:29:55 +0000 (18:29 +0900)] 
global: call lc_init at startup

When leancrypto is statically linked, their constructor will not be
called and which prevents some low-level algorithms being
functional. This adds a manual initialization with lc_init() at the
startup of the GnuTLS library.

Suggested-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Daiki Ueno <ueno@gnu.org>
14 months agoMerge branch 'wip/dueno/ci-pin-nettle3' into 'master'
Daiki Ueno [Mon, 24 Mar 2025 13:00:04 +0000 (22:00 +0900)] 
Merge branch 'wip/dueno/ci-pin-nettle3' into 'master'

.gitlab-ci.yml: use Nettle from release-3.10-fixes branch

See merge request gnutls/gnutls!1943

14 months agoliboqs: fix shared secret assignment after decaps
Daiki Ueno [Mon, 24 Mar 2025 07:06:11 +0000 (16:06 +0900)] 
liboqs: fix shared secret assignment after decaps

Although we are removing liboqs support, this fixes the
_gnutls_pk_decaps implementation, where the returned shared_secret is
overridden with an empty shared secret.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
14 months ago.gitlab-ci.yml: use Nettle from release-3.10-fixes branch
Daiki Ueno [Fri, 21 Mar 2025 00:30:00 +0000 (09:30 +0900)] 
.gitlab-ci.yml: use Nettle from release-3.10-fixes branch

The current Nettle master branch (for 4.0 release) contains
incompatible changes which GnuTLS hasn't yet accommodated. This sticks
to the latest 3.10 branch to work that around.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
15 months agoMerge branch 'wip/dueno/minor-fixes' into 'master'
Daiki Ueno [Thu, 20 Feb 2025 08:02:12 +0000 (08:02 +0000)] 
Merge branch 'wip/dueno/minor-fixes' into 'master'

build: fix SONAME detection when linking failed

See merge request gnutls/gnutls!1935

15 months agotests: make pqc-hybrid-kx.sh work when system time set beyond 2038
Daiki Ueno [Thu, 13 Feb 2025 07:23:07 +0000 (16:23 +0900)] 
tests: make pqc-hybrid-kx.sh work when system time set beyond 2038

Signed-off-by: Daiki Ueno <ueno@gnu.org>
15 months agobuild: fix SONAME detection when linking failed
Daiki Ueno [Thu, 13 Feb 2025 06:53:25 +0000 (15:53 +0900)] 
build: fix SONAME detection when linking failed

When linking to a shared library fails, the previous check defined the
<LIB>_LIBRARY_SONAME macro to "none", instead of leaving it undefined.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
15 months agoMerge branch 'wip/dueno/no-shuffle-extensions' into 'master'
Daiki Ueno [Mon, 10 Feb 2025 02:30:12 +0000 (02:30 +0000)] 
Merge branch 'wip/dueno/no-shuffle-extensions' into 'master'

handshake: only shuffle extensions in the first Client Hello

Closes #1660

See merge request gnutls/gnutls!1930

15 months agohandshake: only shuffle extensions in the first Client Hello
Daiki Ueno [Sun, 9 Feb 2025 01:31:20 +0000 (10:31 +0900)] 
handshake: only shuffle extensions in the first Client Hello

RFC 8446 section 4.1.2 states that the second Client Hello after HRR
should preserve the same content as the first Client Hello with
limited exceptions.  Since GnuTLS 3.8.5, however, the library started
shuffling the order of extensions for privacy reasons and that didn't
comply with the RFC, leading to a connectivity issue against the
server configuration with a stricter check on that.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
15 months agoMerge branch 'wip/dueno/revert-parallel-doc' into 'master' 3.8.9
Daiki Ueno [Sat, 8 Feb 2025 04:39:45 +0000 (04:39 +0000)] 
Merge branch 'wip/dueno/revert-parallel-doc' into 'master'

Unblock 3.8.9 release

See merge request gnutls/gnutls!1929

15 months ago.gitlab-ci.yml: temporarily disable fedora-nettle-minigmp/test
Daiki Ueno [Sat, 8 Feb 2025 02:02:39 +0000 (11:02 +0900)] 
.gitlab-ci.yml: temporarily disable fedora-nettle-minigmp/test

This target for some reason takes too long to complete. As we don't
recommend building it with --enable-mini-gmp, only exercise the build
stage for now.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
15 months agoRevert "doc: Fix races in a parallel build."
Daiki Ueno [Fri, 7 Feb 2025 22:58:34 +0000 (07:58 +0900)] 
Revert "doc: Fix races in a parallel build."

This reverts commit 8daba130cc0c4100186af0b61bc3e65d54a46727, which
turned out to cause a rebuild of .info files at "make distcheck" in a
read-only srcdir.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
15 months agoMerge branch 'wip/dueno/release-3.8.9' into 'master'
Daiki Ueno [Fri, 7 Feb 2025 09:02:10 +0000 (09:02 +0000)] 
Merge branch 'wip/dueno/release-3.8.9' into 'master'

Release 3.8.9

Closes #1553 and #1653

See merge request gnutls/gnutls!1928

15 months agoRelease 3.8.9
Daiki Ueno [Sun, 26 Jan 2025 00:32:40 +0000 (09:32 +0900)] 
Release 3.8.9

Signed-off-by: Daiki Ueno <ueno@gnu.org>
15 months agomaint: update libtasn1 to 4.20.0
Daiki Ueno [Thu, 6 Feb 2025 21:28:03 +0000 (06:28 +0900)] 
maint: update libtasn1 to 4.20.0

Signed-off-by: Daiki Ueno <ueno@gnu.org>
15 months agox509: optimize name constraints processing
Daiki Ueno [Mon, 18 Nov 2024 08:23:46 +0000 (17:23 +0900)] 
x509: optimize name constraints processing

This switches the representation name constraints from linked lists to
array lists to optimize the lookup performance from O(n) to O(1), also
enforces a limit of name constraint checks against subject alternative
names.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
15 months agocerttool: default to PKCS#8 when generating RSA-OAEP key
Daiki Ueno [Wed, 5 Feb 2025 08:19:03 +0000 (17:19 +0900)] 
certtool: default to PKCS#8 when generating RSA-OAEP key

Signed-off-by: Daiki Ueno <ueno@gnu.org>
15 months agokey_share: send illegal_parameter when parsing EC key share fails
Daiki Ueno [Wed, 29 Jan 2025 02:57:44 +0000 (11:57 +0900)] 
key_share: send illegal_parameter when parsing EC key share fails

When the received EC key share is malformed,
_gnutls_ecc_ansi_x962_import returns GNUTLS_E_PARSING_ERROR or
GNUTLS_E_MEMORY_ERROR, which maps to an internal_error alert. This
explicitly return GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER to send
illegal_parameter instead, in compliance with the RFC.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
15 months agom4: update ax_code_coverage.m4 from autoconf-archive
Daiki Ueno [Sun, 26 Jan 2025 00:38:21 +0000 (09:38 +0900)] 
m4: update ax_code_coverage.m4 from autoconf-archive

Signed-off-by: Daiki Ueno <ueno@gnu.org>
15 months agotests: remove unmatched GCC pragma in tests/test-chains-issuer-aia.h
Daiki Ueno [Sat, 25 Jan 2025 09:09:25 +0000 (18:09 +0900)] 
tests: remove unmatched GCC pragma in tests/test-chains-issuer-aia.h

Signed-off-by: Daiki Ueno <ueno@gnu.org>
15 months agobuild: don't redefine AM_CPPFLAGS in libdane/Makefile.am
Daiki Ueno [Sat, 25 Jan 2025 09:07:44 +0000 (18:07 +0900)] 
build: don't redefine AM_CPPFLAGS in libdane/Makefile.am

Signed-off-by: Daiki Ueno <ueno@gnu.org>
16 months agoMerge branch 'wip/dueno/license-files' into 'master'
Daiki Ueno [Mon, 27 Jan 2025 10:24:32 +0000 (10:24 +0000)] 
Merge branch 'wip/dueno/license-files' into 'master'

maint: consolidate licensing information to top-level directory

See merge request gnutls/gnutls!1923

16 months agomaint: consolidate licensing information to top-level directory
Daiki Ueno [Wed, 15 Jan 2025 02:16:32 +0000 (11:16 +0900)] 
maint: consolidate licensing information to top-level directory

Signed-off-by: Daiki Ueno <ueno@gnu.org>
16 months agoMerge branch 'wip/dueno/lc' into 'master'
Daiki Ueno [Mon, 27 Jan 2025 08:09:41 +0000 (08:09 +0000)] 
Merge branch 'wip/dueno/lc' into 'master'

leancrypto: support leancrypto for post-quantum algorithms

See merge request gnutls/gnutls!1925

16 months agoMerge branch 'zfridric_devel2' into 'master'
Zoltán Fridrich [Sat, 25 Jan 2025 22:59:00 +0000 (22:59 +0000)] 
Merge branch 'zfridric_devel2' into 'master'

Add check for empty compressed certificate

Closes #1593

See merge request gnutls/gnutls!1927