]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
12 months agocli: print DEFAULT_TRUST_STORE_{DIR,PKCS11} with --list-config
Daiki Ueno [Mon, 7 Jul 2025 23:47:07 +0000 (08:47 +0900)] 
cli: print DEFAULT_TRUST_STORE_{DIR,PKCS11} with --list-config

Signed-off-by: Daiki Ueno <ueno@gnu.org>
12 months agohandshake: clear HSK_PSK_SELECTED is when resetting binders
Daiki Ueno [Mon, 7 Jul 2025 02:15:45 +0000 (11:15 +0900)] 
handshake: clear HSK_PSK_SELECTED is when resetting binders

When a TLS 1.3 handshake involves HRR and resumption or PSK, and the
second Client Hello omits PSK, the server would result in a NULL
pointer dereference as the PSK binder information is cleared while the
HSK_PSK_SELECTED flag is still set. This makes sure that
HSK_PSK_SELECTED flag is always cleared when the PSK binders are
reset. This also makes it clear the HSK_PSK_SELECTED flag is valid
only during a handshake; after that, whether PSK is used can be
checked with gnutls_auth_client_get_type.

Reported by Stefan Bühler.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
12 months agocerttool: avoid 1-byte write buffer overrun when parsing template
Daiki Ueno [Mon, 7 Jul 2025 01:57:10 +0000 (10:57 +0900)] 
certtool: avoid 1-byte write buffer overrun when parsing template

Previously, when parsing a template file with a number of key value
pairs, certtool could write a NUL byte after the heap buffer, causing
a memory corruption. This fixes the issue by allocating the NUL byte.
Reported by David Aitel.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
12 months agox509: avoid double free when exporting othernames in SAN
Daiki Ueno [Mon, 7 Jul 2025 01:44:12 +0000 (10:44 +0900)] 
x509: avoid double free when exporting othernames in SAN

Previously, the _gnutls_write_new_othername function, called by
gnutls_x509_ext_export_subject_alt_names to export "otherName" in a
certificate's SAN extension, freed the caller allocated ASN.1
structure upon error, resulting in a potential double-free.

Reported by OpenAI Security Research Team.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
12 months agox509: reject zero-length version in certificate request
Andrew Hamilton [Mon, 7 Jul 2025 01:35:54 +0000 (10:35 +0900)] 
x509: reject zero-length version in certificate request

Ensure zero size asn1 values are considered invalid in
gnutls_x509_crq_get_version, this ensures crq version is not used
uninitialized. Spotted by oss-fuzz at:
https://issues.oss-fuzz.com/issues/42536706

Signed-off-by: Andrew Hamilton <adhamilt@gmail.com>
Signed-off-by: Daiki Ueno <ueno@gnu.org>
12 months agopsk: fix read buffer overrun in the "pre_shared_key" extension
Andrew Hamilton [Mon, 7 Jul 2025 01:31:55 +0000 (10:31 +0900)] 
psk: fix read buffer overrun in the "pre_shared_key" extension

While processing the "pre_shared_key" extension in TLS 1.3, if there
are certain malformed data in the extension headers, then the code may
read uninitialized memory (2 bytes) beyond the received TLS extension
buffer. Spotted by oss-fuzz at:
https://issues.oss-fuzz.com/issues/42513990

Signed-off-by: Andrew Hamilton <adhamilt@gmail.com>
Signed-off-by: Daiki Ueno <ueno@gnu.org>
12 months agox509: fix read buffer overrun in SCT timestamps
Andrew Hamilton [Mon, 7 Jul 2025 01:23:59 +0000 (10:23 +0900)] 
x509: fix read buffer overrun in SCT timestamps

Prevent reading beyond heap buffer in call to _gnutls_parse_ct_sct
when processing x509 Signed Certificate Timestamps with certain
malformed data. Spotted by oss-fuzz at:
https://issues.oss-fuzz.com/issues/42530513

Signed-off-by: Andrew Hamilton <adhamilt@gmail.com>
Signed-off-by: Daiki Ueno <ueno@gnu.org>
12 months agoMerge branch 'wip/dueno/pkcs11-provider-docs' into 'master'
Daiki Ueno [Mon, 7 Jul 2025 21:51:04 +0000 (06:51 +0900)] 
Merge branch 'wip/dueno/pkcs11-provider-docs' into 'master'

Add documentation for the pkcs#11-provider

See merge request gnutls/gnutls!1978

12 months agoAdd NEWS entry for the PKCS#11 provider [skip ci]
Zoltan Fridrich [Mon, 7 Jul 2025 08:09:00 +0000 (10:09 +0200)] 
Add NEWS entry for the PKCS#11 provider [skip ci]

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
12 months agoAdd documentation for the pkcs#11-provider
Zoltan Fridrich [Mon, 7 Jul 2025 08:02:20 +0000 (10:02 +0200)] 
Add documentation for the pkcs#11-provider

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
12 months agoMerge branch 'wip/dueno/pkcs11-provider-fixes' into 'master'
Daiki Ueno [Mon, 7 Jul 2025 07:44:11 +0000 (16:44 +0900)] 
Merge branch 'wip/dueno/pkcs11-provider-fixes' into 'master'

Minor build fixes for pkcs11-provider

See merge request gnutls/gnutls!1975

12 months agobuild: fix build with --with-included-libtasn1
Daiki Ueno [Mon, 7 Jul 2025 07:44:11 +0000 (16:44 +0900)] 
build: fix build with --with-included-libtasn1

As libminitasn1.la is always built a static library, linking it twice
makes linking fail because of duplicated symbols. This also stops
including <nettle/bignum.h> as it is unused and causing compile error
on macOS homebrew:

  In file included from p11_pk.c:32:
  /opt/homebrew/Cellar/nettle/3.10.2/include/nettle/bignum.h:50:11: fatal error: 'gmp.h' file not found
  # include <gmp.h>
            ^~~~~~~
  1 error generated.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
12 months agoMerge branch 'patch5' into 'master'
Daiki Ueno [Sat, 5 Jul 2025 00:56:36 +0000 (09:56 +0900)] 
Merge branch 'patch5' into 'master'

lib/hello_ext.c: Add gnutls_free() to avoid memory leak

See merge request gnutls/gnutls!1955

12 months agolib/hello_ext.c: Add gnutls_free() to avoid memory leak
Jiasheng Jiang [Sat, 5 Jul 2025 00:56:36 +0000 (00:56 +0000)] 
lib/hello_ext.c: Add gnutls_free() to avoid memory leak

Add gnutls_free() to free tmp_mod.name in the error handling to avoid memory leak.

Fixes: 5bba569b4 ("gnutls_session_ext_register: keep track of extension name")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
12 months agoMerge branch 'patch4' into 'master'
Daiki Ueno [Sat, 5 Jul 2025 00:55:17 +0000 (09:55 +0900)] 
Merge branch 'patch4' into 'master'

lib/x509/x509_ext.c: Add gnutls_free() to avoid memory leak

See merge request gnutls/gnutls!1954

12 months agolib/x509/x509_ext.c: Add gnutls_free() to avoid memory leak
Jiasheng Jiang [Sat, 5 Jul 2025 00:55:17 +0000 (00:55 +0000)] 
lib/x509/x509_ext.c: Add gnutls_free() to avoid memory leak

Add gnutls_free() to free ooc if subject_alt_names_set() fails to avoid memory leak.

Fixes: 2bd323f72 ("Added new API to handle X.509 extensions.")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
12 months agoMerge branch 'patch8' into 'master'
Daiki Ueno [Sat, 5 Jul 2025 00:49:56 +0000 (09:49 +0900)] 
Merge branch 'patch8' into 'master'

tests/x509-cert-callback-ocsp.c: Free p and certs on error to avoid memory leak

See merge request gnutls/gnutls!1958

12 months agotests/x509-cert-callback-ocsp.c: Free p and certs on error to avoid memory leak
Jiasheng Jiang [Sat, 5 Jul 2025 00:49:56 +0000 (00:49 +0000)] 
tests/x509-cert-callback-ocsp.c: Free p and certs on error to avoid memory leak

Call gnutls_free() to release p and certs on error, preventing a memory leak.

Fixes: db486d97c ("tests: enhanced OCSP tests")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
12 months agoMerge branch 'patch10' into 'master'
Daiki Ueno [Sat, 5 Jul 2025 00:49:09 +0000 (09:49 +0900)] 
Merge branch 'patch10' into 'master'

tests/x509-cert-callback.c: Free p and certs on error to avoid memory leak

See merge request gnutls/gnutls!1960

12 months agotests/x509-cert-callback.c: Free p and certs on error to avoid memory leak
Jiasheng Jiang [Sat, 5 Jul 2025 00:49:09 +0000 (00:49 +0000)] 
tests/x509-cert-callback.c: Free p and certs on error to avoid memory leak

Call gnutls_free() to release p and certs on error, preventing a memory leak.

Fixes: ed02ed050 ("tests: added check with X.509 certificates and callbacks")
Signed-off-by: JiashengJiang <jiasheng@purdue.edu>
12 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

12 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

12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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

12 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>
12 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>
12 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

12 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>
12 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

12 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>
12 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>
12 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>
12 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

13 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>
13 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

13 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>
13 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

13 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>
13 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

13 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>
13 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

13 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>
13 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

13 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>
13 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

13 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>
13 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

13 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>
13 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

13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
14 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

14 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>
15 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

15 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>
15 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

15 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>
15 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

15 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>
15 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>
15 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

15 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>
15 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>
15 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>
15 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>
16 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

16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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>
16 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

16 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>
16 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

16 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>
16 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

16 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

16 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>
16 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>
16 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>
16 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>
16 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

16 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>
16 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>
17 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