]> git.ipfire.org Git - thirdparty/gnutls.git/log
thirdparty/gnutls.git
3 years agoMerge branch 'zfridric_devel3' into 'master'
Zoltán Fridrich [Tue, 31 Jan 2023 08:47:29 +0000 (08:47 +0000)] 
Merge branch 'zfridric_devel3' into 'master'

gnutlsxx: become header-only library

See merge request gnutls/gnutls!1693

3 years agoIndent cpp header
Zoltan Fridrich [Mon, 30 Jan 2023 11:32:56 +0000 (12:32 +0100)] 
Indent cpp header

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
3 years agognutlsxx: add source file for shared library
Nikolaos Chatzikonstantinou [Mon, 19 Dec 2022 05:34:49 +0000 (07:34 +0200)] 
gnutlsxx: add source file for shared library

The compiler will not produce a shared library from a header, so a
source file is necessary when producing the gnutlsxx shared library.

Signed-off-by: Nikolaos Chatzikonstantinou <nchatz314@gmail.com>
3 years agognutlsxx: remove unnecessary linking from makefiles
Nikolaos Chatzikonstantinou [Mon, 19 Dec 2022 04:02:17 +0000 (06:02 +0200)] 
gnutlsxx: remove unnecessary linking from makefiles

Signed-off-by: Nikolaos Chatzikonstantinou <nchatz314@gmail.com>
3 years agognutlsxx: become header-only library
Nikolaos Chatzikonstantinou [Sun, 18 Dec 2022 23:37:08 +0000 (01:37 +0200)] 
gnutlsxx: become header-only library

This patch removes the old gnutlsxx library and instead moves all the
definitions of the source file `gnutlsxx.c` to the header file
`gnutlsxx.h`. However, both the C and the C++ library are built. (as
before.)

The user of the C++ interface has two options to choose from:

1. include `gnutlsxx.h` in their application and link against the C
   library. (the default.)
2. include `gnutlsxx.h` in their application, compile with the
   GNUTLS_GNUTLSXX_NO_HEADERONLY macro defined and link against the C++
   library.

Addresses Ref #1381

Signed-off-by: Nikolaos Chatzikonstantinou <nchatz314@gmail.com>
3 years agoMerge branch 'zfridric_devel3' into 'master'
Zoltán Fridrich [Mon, 30 Jan 2023 08:30:26 +0000 (08:30 +0000)] 
Merge branch 'zfridric_devel3' into 'master'

Add code indentation

Closes #1419

See merge request gnutls/gnutls!1692

3 years agoSilence 'make syntax-check'
Zoltan Fridrich [Fri, 27 Jan 2023 14:42:39 +0000 (15:42 +0100)] 
Silence 'make syntax-check'

Co-authored-by: Simon Josefsson <simon@josefsson.org>
Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
3 years agoNEWS: mention code indentation
Zoltan Fridrich [Fri, 27 Jan 2023 14:22:01 +0000 (15:22 +0100)] 
NEWS: mention code indentation

Co-authored-by: Simon Josefsson <simon@josefsson.org>
Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
3 years agoIndent code
Zoltan Fridrich [Fri, 27 Jan 2023 14:03:53 +0000 (15:03 +0100)] 
Indent code

Co-authored-by: Simon Josefsson <simon@josefsson.org>
Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
3 years agoCheck code indentation in 'check_commit'
Zoltan Fridrich [Fri, 27 Jan 2023 10:10:51 +0000 (11:10 +0100)] 
Check code indentation in 'check_commit'

Co-authored-by: Simon Josefsson <simon@josefsson.org>
Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
3 years agoDeal with '# define' for indent -ppi1
Zoltan Fridrich [Fri, 27 Jan 2023 10:08:05 +0000 (11:08 +0100)] 
Deal with '# define' for indent -ppi1

Co-authored-by: Simon Josefsson <simon@josefsson.org>
Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
3 years agoFix indent errors
Zoltan Fridrich [Fri, 27 Jan 2023 09:27:21 +0000 (10:27 +0100)] 
Fix indent errors

Co-authored-by: Simon Josefsson <simon@josefsson.org>
Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
3 years agoAdd code indentation scripts
Zoltan Fridrich [Fri, 27 Jan 2023 12:38:45 +0000 (13:38 +0100)] 
Add code indentation scripts

Co-authored-by: Simon Josefsson <simon@josefsson.org>
Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
3 years agoMerge branch 'wip/dueno/coverage' into 'master'
Daiki Ueno [Wed, 18 Jan 2023 22:58:28 +0000 (22:58 +0000)] 
Merge branch 'wip/dueno/coverage' into 'master'

.gitlab-ci.yml: take advantage of GitLab code coverage visualization

See merge request gnutls/gnutls!1691

3 years ago.gitlab-ci.yml: take advantage of GitLab code coverage visualization
Daiki Ueno [Tue, 17 Jan 2023 10:47:11 +0000 (19:47 +0900)] 
.gitlab-ci.yml: take advantage of GitLab code coverage visualization

This switches to using gcovr instead of our custom coverage generation
rule to take advantage of "Test coverage visualization" in GitLab:
https://docs.gitlab.com/ee/ci/testing/test_coverage_visualization.html

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agoMerge branch 'wip/dueno/ci-fixes3' into 'master'
Daiki Ueno [Fri, 13 Jan 2023 23:27:17 +0000 (23:27 +0000)] 
Merge branch 'wip/dueno/ci-fixes3' into 'master'

.gitlab-ci.yml: consolidate duplicate "aggressive" targets

See merge request gnutls/gnutls!1690

3 years ago.gitlab-ci.yml: consolidate duplicate "aggressive" targets
Daiki Ueno [Fri, 30 Dec 2022 02:08:36 +0000 (11:08 +0900)] 
.gitlab-ci.yml: consolidate duplicate "aggressive" targets

The UB+ASAN-Werror.Fedora.x86_64.gcc-aggressive shared almost same
tasks with UB+ASAN-Werror-aggressive.Fedora.x86_64.gcc, except the
former explicitly specified --disable-hardware-acceleration.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agoMerge branch 'wip/dueno/ca-path' into 'master'
Daiki Ueno [Wed, 11 Jan 2023 09:30:03 +0000 (09:30 +0000)] 
Merge branch 'wip/dueno/ca-path' into 'master'

trust: make filesystem path construction flexible

Closes #1280

See merge request gnutls/gnutls!1493

3 years ago.gitlab-ci.yml: disable cppcheck for now
Daiki Ueno [Wed, 11 Jan 2023 06:24:14 +0000 (15:24 +0900)] 
.gitlab-ci.yml: disable cppcheck for now

The current version of cppcheck hangs at the usage of Gnulib's
intprops module:
https://trac.cppcheck.net/ticket/10192

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agotrust: make filesystem path construction flexible
Daiki Ueno [Tue, 20 Sep 2022 06:08:59 +0000 (15:08 +0900)] 
trust: make filesystem path construction flexible

To handle pathnames longer than the fixed length (previously 256),
this adds a set of internal API functions around the gnutls_pathbuf_st
struct, which enables to safely and efficiently construct pathnames.
The new API initially uses the statically allocated buffer and starts
allocating memory on heap only after the limit has reached.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agoMerge branch 'zfridric_devel2' into 'master'
Zoltán Fridrich [Tue, 10 Jan 2023 17:11:30 +0000 (17:11 +0000)] 
Merge branch 'zfridric_devel2' into 'master'

Forbid uncolicited CompressedCertificate messages

Closes #1440

See merge request gnutls/gnutls!1678

3 years agoFix error codes for unsolicited compressed certificate
Zoltan Fridrich [Mon, 2 Jan 2023 12:25:14 +0000 (13:25 +0100)] 
Fix error codes for unsolicited compressed certificate

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
3 years agoUpdate year of copyright notices in doc/gnutls.texi
Zoltan Fridrich [Tue, 3 Jan 2023 08:06:01 +0000 (09:06 +0100)] 
Update year of copyright notices in doc/gnutls.texi

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
3 years agoMerge branch 'wip/dueno/srtp' into 'master'
Daiki Ueno [Fri, 6 Jan 2023 11:07:38 +0000 (11:07 +0000)] 
Merge branch 'wip/dueno/srtp' into 'master'

srtp: support AES-GCM profiles

Closes #1266

See merge request gnutls/gnutls!1685

3 years agoMerge branch 'wip/dueno/max-record-send-size' into 'master'
Daiki Ueno [Fri, 6 Jan 2023 11:06:43 +0000 (11:06 +0000)] 
Merge branch 'wip/dueno/max-record-send-size' into 'master'

build: remove MAX_RECORD_SEND_SIZE in favor of max_record_send_size

Closes #815

See merge request gnutls/gnutls!1684

3 years agoForbid unsolicited CompressedCertificate message
Zoltan Fridrich [Thu, 8 Dec 2022 11:41:34 +0000 (12:41 +0100)] 
Forbid unsolicited CompressedCertificate message

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
3 years agoFail when received cert is compressed with disabled method
Zoltan Fridrich [Thu, 8 Dec 2022 10:49:16 +0000 (11:49 +0100)] 
Fail when received cert is compressed with disabled method

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
3 years agoSlight reformating of compress_certificate code
Zoltan Fridrich [Thu, 8 Dec 2022 11:08:10 +0000 (12:08 +0100)] 
Slight reformating of compress_certificate code

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
3 years agobuild: suppress ABI change for GNUTLS_SRTP_AEAD_AES_*_GCM additions
Daiki Ueno [Wed, 28 Dec 2022 03:42:27 +0000 (12:42 +0900)] 
build: suppress ABI change for GNUTLS_SRTP_AEAD_AES_*_GCM additions

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agoMerge branch 'debian-texlive' into 'master'
Daiki Ueno [Tue, 27 Dec 2022 23:15:39 +0000 (23:15 +0000)] 
Merge branch 'debian-texlive' into 'master'

doc: Fix Debian package name texlive-plain-generic

See merge request gnutls/gnutls!1689

3 years agoMerge branch 'install-md-fixes' into 'master'
Daiki Ueno [Tue, 27 Dec 2022 23:00:47 +0000 (23:00 +0000)] 
Merge branch 'install-md-fixes' into 'master'

doc: Fix several minor issues in INSTALL.md

See merge request gnutls/gnutls!1688

3 years agoMerge branch 'https' into 'master'
Daiki Ueno [Tue, 27 Dec 2022 22:59:25 +0000 (22:59 +0000)] 
Merge branch 'https' into 'master'

Prefer HTTPS to HTTP in URLs

See merge request gnutls/gnutls!1687

3 years agodoc: Fix Debian package name texlive-plain-generic
Stefan Kangas [Tue, 27 Dec 2022 18:53:11 +0000 (19:53 +0100)] 
doc: Fix Debian package name texlive-plain-generic

The package texlive-generic-recommended is a transitional dummy package for
texlive-plain-generic in Debian buster (currently oldstable).
See: https://packages.debian.org/texlive-generic-recommended

Signed-off-by: Stefan Kangas <stefankangas@gmail.com>
3 years agodoc: Fix several minor issues in INSTALL.md
Stefan Kangas [Tue, 27 Dec 2022 18:13:53 +0000 (19:13 +0100)] 
doc: Fix several minor issues in INSTALL.md

- Fix reference to moved file.
- Fix a dead link, and a typo.
- Use two spaces between sentences, and no trailing whitespace.

Signed-off-by: Stefan Kangas <stefankangas@gmail.com>
3 years agoMerge branch 'typos' into 'master'
Daiki Ueno [Tue, 27 Dec 2022 17:44:08 +0000 (17:44 +0000)] 
Merge branch 'typos' into 'master'

Fix typos

See merge request gnutls/gnutls!1686

3 years agoSync GPL/LGPL license files from Gnulib
Stefan Kangas [Tue, 27 Dec 2022 17:02:13 +0000 (18:02 +0100)] 
Sync GPL/LGPL license files from Gnulib

Signed-off-by: Stefan Kangas <stefankangas@gmail.com>
3 years agoReplace FSF snail mail addresses with URL
Stefan Kangas [Tue, 27 Dec 2022 15:42:58 +0000 (16:42 +0100)] 
Replace FSF snail mail addresses with URL

This is the latest recommendation, as described here:
https://www.gnu.org/licenses/gpl-howto.html

Signed-off-by: Stefan Kangas <stefankangas@gmail.com>
3 years agoPrefer HTTPS to HTTP in URLs
Stefan Kangas [Tue, 27 Dec 2022 14:16:05 +0000 (15:16 +0100)] 
Prefer HTTPS to HTTP in URLs

This mostly updates NEWS and license links.  All links have been
manually tested and confirmed working.

Signed-off-by: Stefan Kangas <stefankangas@gmail.com>
3 years agoFix typos
Stefan Kangas [Mon, 26 Dec 2022 22:48:16 +0000 (23:48 +0100)] 
Fix typos

Signed-off-by: Stefan Kangas <stefankangas@gmail.com>
3 years agosrtp: support AES-GCM profiles
Daiki Ueno [Sat, 24 Dec 2022 08:37:24 +0000 (17:37 +0900)] 
srtp: support AES-GCM profiles

This adds support for SRTP_AEAD_AES_128_GCM and SRTP_AEAD_AES_256_GCM
profiles defined in RFC 7714.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agobuild: remove MAX_RECORD_SEND_SIZE in favor of max_record_send_size
Daiki Ueno [Sat, 24 Dec 2022 08:07:26 +0000 (17:07 +0900)] 
build: remove MAX_RECORD_SEND_SIZE in favor of max_record_send_size

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agoMerge branch 'wip/dueno/ccs-value' into 'master'
Daiki Ueno [Wed, 21 Dec 2022 22:53:59 +0000 (22:53 +0000)] 
Merge branch 'wip/dueno/ccs-value' into 'master'

record: enable check on CCS content also in TLS 1.2

Closes #1439

See merge request gnutls/gnutls!1677

3 years agorecord: enable check on CCS content also in TLS 1.2
Daiki Ueno [Thu, 8 Dec 2022 02:53:20 +0000 (11:53 +0900)] 
record: enable check on CCS content also in TLS 1.2

This generilizes the value check of Change Cipher Spec for all TLS
protocol versions including TLS 1.2 or earlier.  It also fixes the
logic of the check so the value is decrypted before being examined,
according to the RFC.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agoMerge branch 'wip/dueno/disable-srp' into 'master'
Daiki Ueno [Tue, 20 Dec 2022 14:07:36 +0000 (14:07 +0000)] 
Merge branch 'wip/dueno/disable-srp' into 'master'

build: disable SRP authentication by default

Closes #943

See merge request gnutls/gnutls!1681

3 years agotests: conditionalize SRP tests
Daiki Ueno [Sat, 17 Dec 2022 23:00:59 +0000 (08:00 +0900)] 
tests: conditionalize SRP tests

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agobuild: disable SRP authentication by default
Daiki Ueno [Sat, 17 Dec 2022 06:44:07 +0000 (15:44 +0900)] 
build: disable SRP authentication by default

SRP authentication in TLS is not up to date with the latest TLS
standards and its ciphersuites are based on the CBC mode and SHA-1.
This makes the feature disabled by default at compile time, though the
users are still be able to enable it with --enable-srp-authentication
configure option.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agoMerge branch 'new-interop-tests' into 'master'
Daiki Ueno [Tue, 20 Dec 2022 06:15:45 +0000 (06:15 +0000)] 
Merge branch 'new-interop-tests' into 'master'

Added new interoperability tests

See merge request gnutls/gnutls!1680

3 years agoMerge branch 'master' into 'master'
Daiki Ueno [Tue, 20 Dec 2022 03:18:13 +0000 (03:18 +0000)] 
Merge branch 'master' into 'master'

fix obtain credential type based on the key exchange type fail;fix log print key mac size error

See merge request gnutls/gnutls!1670

3 years agoMerge branch 'wip/dueno/disable-heartbeat' into 'master'
Daiki Ueno [Mon, 19 Dec 2022 13:39:11 +0000 (13:39 +0000)] 
Merge branch 'wip/dueno/disable-heartbeat' into 'master'

build: disable TLS heartbeat extension by default

Closes #743

See merge request gnutls/gnutls!1682

3 years ago.gitlab-ci.yml: ensure libtasn1-tools is installed
Daiki Ueno [Mon, 19 Dec 2022 09:40:37 +0000 (18:40 +0900)] 
.gitlab-ci.yml: ensure libtasn1-tools is installed

With recent DNF, removing libtasn1-devel causes libtasn1-tools to be
removed.  Manually reinstall it in that case.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agobuild: disable TLS heartbeat extension by default
Daiki Ueno [Sat, 17 Dec 2022 06:55:33 +0000 (15:55 +0900)] 
build: disable TLS heartbeat extension by default

The heartbeat extension in TLS (RFC 6520) is not widely used given
other implementations dropped support for it. This makes it disabled
by default, though the users are able to enable it back with the
--enable-heartbeat-support configure option.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agoMerge branch 'wip/dueno/c99' into 'master'
Daiki Ueno [Mon, 19 Dec 2022 08:24:38 +0000 (08:24 +0000)] 
Merge branch 'wip/dueno/c99' into 'master'

Minor build fixes

See merge request gnutls/gnutls!1683

3 years agofix memory leak when process client ecdh key exchage
xuraoqing [Thu, 15 Dec 2022 09:02:59 +0000 (17:02 +0800)] 
fix memory leak when process client ecdh key exchage

Signed-off-by: xuraoqing <xuraoqing@huawei.com>
3 years agocert-auth: alloc_and_load_x509_certs: check requested cert count
Daiki Ueno [Sat, 17 Dec 2022 23:21:46 +0000 (08:21 +0900)] 
cert-auth: alloc_and_load_x509_certs: check requested cert count

... instead of pointer. Otherwise GCC analyzer treats it as
-Wanalyzer-null-dereference in the caller side.  While that shouldn't
happen, it would be nice to make the code handle it robustly.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agobuild: avoid using implicit int to adhere to C99
Daiki Ueno [Sat, 17 Dec 2022 23:05:05 +0000 (08:05 +0900)] 
build: avoid using implicit int to adhere to C99

Otherwise -Wstrict-prototypes now emits the following warnings:

  mini-dtls-large.c:30:5: error: function declaration isn't a prototype [-Werror=strict-prototypes]
     30 | int main()
        |     ^~~~
  mini-dtls-large.c: In function 'main':
  mini-dtls-large.c:30:5: error: old-style function definition [-Werror=old-style-definition]
  cc1: all warnings being treated as errors

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agonew interop-tests
Peter Leitmann [Wed, 14 Dec 2022 17:22:54 +0000 (18:22 +0100)] 
new interop-tests

Signed-off-by: Peter Leitmann <pleitman@redhat.com>
3 years agoMerge branch 'wip/dueno/stubs' into 'master'
Daiki Ueno [Fri, 16 Dec 2022 09:06:47 +0000 (09:06 +0000)] 
Merge branch 'wip/dueno/stubs' into 'master'

srp: provide stubs of public functions even if SRP is disabled

See merge request gnutls/gnutls!1679

3 years agobuild: remove code guarded with no longer defined ENABLE_RSA_EXPORT
Daiki Ueno [Wed, 14 Dec 2022 15:51:42 +0000 (00:51 +0900)] 
build: remove code guarded with no longer defined ENABLE_RSA_EXPORT

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agobuild: remove checks on no longer defined ENABLE_OPENPGP
Daiki Ueno [Wed, 14 Dec 2022 15:48:16 +0000 (00:48 +0900)] 
build: remove checks on no longer defined ENABLE_OPENPGP

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agosrp: provide stubs of public functions even if SRP is disabled
Daiki Ueno [Wed, 14 Dec 2022 15:45:04 +0000 (00:45 +0900)] 
srp: provide stubs of public functions even if SRP is disabled

This adds stub definitions of public SRP functions even if SRP is
disabled with --disable-srp-authentication, to preserve the ABI.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agoMerge branch 'zfridric_devel' into 'master'
Zoltán Fridrich [Wed, 14 Dec 2022 11:29:53 +0000 (11:29 +0000)] 
Merge branch 'zfridric_devel' into 'master'

Use soname instead of file name in fipshmac sections

See merge request gnutls/gnutls!1675

3 years agofix log print server write mac key size error
xuraoqing [Mon, 12 Dec 2022 07:10:59 +0000 (15:10 +0800)] 
fix log print server write mac key size error

Signed-off-by: xuraoqing <xuraoqing@huawei.com>
3 years agofix log print client write mac key size error
xuraoqing [Mon, 12 Dec 2022 07:06:14 +0000 (15:06 +0800)] 
fix log print client write mac key size error

Signed-off-by: xuraoqing <xuraoqing@huawei.com>
3 years agofix get credential type with key exchange algorithm fail
xuraoqing [Mon, 12 Dec 2022 07:05:20 +0000 (15:05 +0800)] 
fix get credential type with key exchange algorithm fail

Signed-off-by: xuraoqing <xuraoqing@huawei.com>
3 years agoUse soname instead of file name in fipshmac sections
Zoltan Fridrich [Fri, 2 Dec 2022 12:12:30 +0000 (13:12 +0100)] 
Use soname instead of file name in fipshmac sections

Using fipshmac program with an argument, for example:
fipshmac /usr/lib64/libgnutls.so.30.28.1
would create a section [libgnutls.so.30.28.1]
and the internal comparison with soname would fail.

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
3 years agoMerge branch 'wip/dueno/memleak-fixes' into 'master'
Daiki Ueno [Wed, 7 Dec 2022 10:13:52 +0000 (10:13 +0000)] 
Merge branch 'wip/dueno/memleak-fixes' into 'master'

Fix memory leaks in tools and tests

Closes #1433 and #1430

See merge request gnutls/gnutls!1672

3 years agoMerge branch 'fix/ktls_fallback' into 'master'
František Krenželok [Tue, 6 Dec 2022 14:26:17 +0000 (14:26 +0000)] 
Merge branch 'fix/ktls_fallback' into 'master'

KTLS: Invalidate session on ktls error

See merge request gnutls/gnutls!1664

3 years agoKTLS: Invalidate session on ktls error
Frantisek Krenzelok [Mon, 31 Oct 2022 11:17:43 +0000 (12:17 +0100)] 
KTLS: Invalidate session on ktls error

We invalidate the session if an KTLS related error occurs after it was
initialized i.e. keys were set on the interfaces.

As of now this only affects key_update() which should be fixed via a
kernel patch. Thus future fallback mechanism implementation is not likely
as that would require yet another kernel patch.

Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
3 years agoMerge branch 'ktls_ciphersuites' into 'master'
František Krenželok [Sat, 3 Dec 2022 18:10:55 +0000 (18:10 +0000)] 
Merge branch 'ktls_ciphersuites' into 'master'

KTLS: additional ciphersuites

See merge request gnutls/gnutls!1676

3 years agoKTLS: add ciphersuites (tests)
Frantisek Krenzelok [Fri, 2 Dec 2022 10:07:48 +0000 (11:07 +0100)] 
KTLS: add ciphersuites (tests)

Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
3 years agoKTLS: add ciphersuites
Frantisek Krenzelok [Thu, 1 Dec 2022 14:37:33 +0000 (15:37 +0100)] 
KTLS: add ciphersuites

* TLS_AES_128_CCM_SHA256
* TLS_CHACHA20_POLY1305_SHA256

Signed-off-by: Frantisek Krenzelok <krenzelok.frantisek@gmail.com>
3 years agoMerge branch 'wip/dueno/fipshmac-followup2' into 'master'
Daiki Ueno [Wed, 30 Nov 2022 15:16:49 +0000 (15:16 +0000)] 
Merge branch 'wip/dueno/fipshmac-followup2' into 'master'

fips: rename .gnutls.hmac back to .libgnutls.so.*.hmac

Closes #1435

See merge request gnutls/gnutls!1674

3 years agofips: rename .gnutls.hmac back to .libgnutls.so.*.hmac
Daiki Ueno [Tue, 29 Nov 2022 02:15:34 +0000 (11:15 +0900)] 
fips: rename .gnutls.hmac back to .libgnutls.so.*.hmac

Using a GnuTLS specific construction of .hmac file name causes a
problem with dracut, which expects that .hmac files are installed
alongside the corresponding shared libraries.

To preserve backward compatibility, this renames the file name back to
.libgnutls.so.*.hmac, while the content remains the same covering all
the dependent libraries (libgnutls, libhogweed, libnettle, and
libgmp).

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agoMerge branch 'wip/dueno/ktls-fixes2' into 'master'
Daiki Ueno [Wed, 30 Nov 2022 10:44:50 +0000 (10:44 +0000)] 
Merge branch 'wip/dueno/ktls-fixes2' into 'master'

Minor fixes on KTLS

Closes #1382

See merge request gnutls/gnutls!1673

3 years agoMerge branch 'wip/dueno/gnulib' into 'master'
Daiki Ueno [Mon, 28 Nov 2022 14:48:40 +0000 (14:48 +0000)] 
Merge branch 'wip/dueno/gnulib' into 'master'

gnulib: update git submodule

See merge request gnutls/gnutls!1509

3 years agopriority: accept "ktls = false" in configuration file
Daiki Ueno [Mon, 28 Nov 2022 03:15:26 +0000 (12:15 +0900)] 
priority: accept "ktls = false" in configuration file

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agosrc: print KTLS enablement status in gnutls-serv/gnutls-cli
Daiki Ueno [Mon, 28 Nov 2022 03:13:31 +0000 (12:13 +0900)] 
src: print KTLS enablement status in gnutls-serv/gnutls-cli

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agoincludes: move KTLS function definition out of <gnutls/socket.h>
Daiki Ueno [Mon, 28 Nov 2022 03:17:12 +0000 (12:17 +0900)] 
includes: move KTLS function definition out of <gnutls/socket.h>

<gnutls/socket.h> is meant for the functions that depend on
<sys/socket.h>, which is not available on Windows platforms.

As the KTLS API doesn't rely on <sys/socket.h>, move the function and
enum to <gnutls/gnutls.h>.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agotests: fix memory leak in resume-with-previous-stek
Daiki Ueno [Mon, 28 Nov 2022 02:14:53 +0000 (11:14 +0900)] 
tests: fix memory leak in resume-with-previous-stek

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agosrc: fix memory leak in print_rawpk_info
Daiki Ueno [Mon, 28 Nov 2022 02:10:58 +0000 (11:10 +0900)] 
src: fix memory leak in print_rawpk_info

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years ago.gitlab-ci.yml: disable full test suite in fedora-nettle jobs
Daiki Ueno [Wed, 23 Nov 2022 06:38:25 +0000 (15:38 +0900)] 
.gitlab-ci.yml: disable full test suite in fedora-nettle jobs

This adds --disable-full-test-suite to fedora-nettle jobs, assuming
other tests have enough coverage of what Nettle provides.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agobuild: pacify sc_unportable_grep_q check
Daiki Ueno [Tue, 22 Nov 2022 04:01:58 +0000 (13:01 +0900)] 
build: pacify sc_unportable_grep_q check

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years ago.gitlab-ci.yml: disable GCC analyzer in sanitizer jobs
Daiki Ueno [Tue, 22 Nov 2022 03:20:58 +0000 (12:20 +0900)] 
.gitlab-ci.yml: disable GCC analyzer in sanitizer jobs

It turned out that -fanalyzer combined with -fsanitize=undefined takes
excessive time when compiling certain files, e.g., lib/priority.c.
Removing -fanalyzer should be safe as it is enabled in other
Fedora-based jobs.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agobuild: suppress GCC analyzer warnings
Daiki Ueno [Thu, 6 Oct 2022 09:44:48 +0000 (18:44 +0900)] 
build: suppress GCC analyzer warnings

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agotests: skip tpm2.sh test for now if OpenSSL version 3 is detected
Daiki Ueno [Wed, 5 Oct 2022 08:44:01 +0000 (17:44 +0900)] 
tests: skip tpm2.sh test for now if OpenSSL version 3 is detected

tpm2-tss-engine does not work well with OpenSSL 3 yet.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years ago.gitlab-ci.yml: bump cache version
Daiki Ueno [Fri, 30 Sep 2022 06:52:41 +0000 (15:52 +0900)] 
.gitlab-ci.yml: bump cache version

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years ago.gitlab-ci.yml: update fedora image to Fedora 36
Daiki Ueno [Tue, 27 Sep 2022 04:13:21 +0000 (13:13 +0900)] 
.gitlab-ci.yml: update fedora image to Fedora 36

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agotests: move <assert.h> out of extern "C"
Daiki Ueno [Mon, 26 Sep 2022 07:48:24 +0000 (16:48 +0900)] 
tests: move <assert.h> out of extern "C"

This fixes the issue with <assert.h> provided by Gnulib:

 ../gl/assert.h:209:1: error: template with C linkage
   209 | template <int w>
       | ^~~~~~~~

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agobuild: use AM_DISTCHECK_CONFIGURE_FLAGS
Daiki Ueno [Mon, 26 Sep 2022 07:46:47 +0000 (16:46 +0900)] 
build: use AM_DISTCHECK_CONFIGURE_FLAGS

Also remove AUTOGEN=false setting, which is no longer necessary.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years ago.gitlab-ci.yml: update mingw image to Fedora 36
Daiki Ueno [Sat, 24 Sep 2022 20:36:49 +0000 (05:36 +0900)] 
.gitlab-ci.yml: update mingw image to Fedora 36

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agogl: add workaround for mingw32 build
Daiki Ueno [Mon, 26 Sep 2022 06:40:55 +0000 (15:40 +0900)] 
gl: add workaround for mingw32 build

This reverts __MINGW_USE_VC2005_COMPAT setting that causes undesired
effects, as mentioned in:
https://lists.gnu.org/archive/html/bug-gnulib/2022-09/msg00150.html

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agognulib: update git submodule
Daiki Ueno [Sat, 8 Jan 2022 17:14:16 +0000 (18:14 +0100)] 
gnulib: update git submodule

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agoMerge branch 'wip/dueno/rsa-pss-saltlen' into 'master'
Daiki Ueno [Mon, 21 Nov 2022 23:58:21 +0000 (23:58 +0000)] 
Merge branch 'wip/dueno/rsa-pss-saltlen' into 'master'

nettle: mark non-compliant RSA-PSS salt length to be not-approved

See merge request gnutls/gnutls!1669

3 years agonettle: mark non-compliant RSA-PSS salt length to be not-approved
Daiki Ueno [Wed, 16 Nov 2022 14:02:13 +0000 (23:02 +0900)] 
nettle: mark non-compliant RSA-PSS salt length to be not-approved

According to FIPS 186-5 5.4, the salt length must be in the range
between 0 and the hash length inclusive.  While the use of those salt
lengths is still allowed for compatibility, it is reported as
non-approved operation through FIPS service indicator.

Signed-off-by: Daiki Ueno <ueno@gnu.org>
3 years agoMerge branch 'SIGPIPE' into 'master'
Daiki Ueno [Wed, 16 Nov 2022 18:01:34 +0000 (18:01 +0000)] 
Merge branch 'SIGPIPE' into 'master'

tests: More SIGPIPE treatment as error

See merge request gnutls/gnutls!1668

3 years agotests: More SIGPIPE treatment as error
Samuel Thibault [Wed, 16 Nov 2022 00:38:54 +0000 (00:38 +0000)] 
tests: More SIGPIPE treatment as error

81f8d97b3486 ("tests: treat all signals as error") turned some SIGPIPE signals
to EPIPE, but missed tests/mini-dtls-mtu.c.

During

gnutls_bye(session, GNUTLS_SHUT_WR),

on Linux we get

client|<11>| WRITE: enqueued 39 bytes for 0x3. Total 39 bytes.
client|<11>| WRITE FLUSH: 39 bytes in buffer.
client|<2>| WRITE: -1 returned from 0x3, errno: 111
(ECONNREFUSED)

but on GNU/Hurd a SIGPIPE is sent instead of returning of ECONNREFUSED.
We thus need to turn it into an error to correctly interpret the test
result.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
3 years agoMerge branch 'zfridric_devel' into 'master'
Zoltán Fridrich [Tue, 15 Nov 2022 16:06:15 +0000 (16:06 +0000)] 
Merge branch 'zfridric_devel' into 'master'

Adjust FIPS integrity check

Closes #1426

See merge request gnutls/gnutls!1666

3 years agoRemove library path checking from FIPS integrity check
Zoltan Fridrich [Tue, 15 Nov 2022 13:35:24 +0000 (14:35 +0100)] 
Remove library path checking from FIPS integrity check

The library path check is being dropped as checking the HMAC of
libraries should be sufficient. Checking the exact path where the
library resides showed to be failure prone. The sonames of libraries are
internally indirectly compared.

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
3 years agoFipshmac: always use realpaths
Zoltan Fridrich [Wed, 9 Nov 2022 15:10:58 +0000 (16:10 +0100)] 
Fipshmac: always use realpaths

Signed-off-by: Zoltan Fridrich <zfridric@redhat.com>
3 years agoMerge branch 'wip/dueno/rehandshake-tickets' into 'master'
Zoltán Fridrich [Tue, 15 Nov 2022 12:01:19 +0000 (12:01 +0000)] 
Merge branch 'wip/dueno/rehandshake-tickets' into 'master'

handshake: clear server's session ticket indication at rehandshake

Closes #1421

See merge request gnutls/gnutls!1663