From f82cc71bfb48ca70595b1d05abe3614ec63ba543a2d6c6dd6fce6755bc84d0de Mon Sep 17 00:00:00 2001
From: Pedro Monreal Gonzalez
Date: Mon, 24 Feb 2025 12:46:22 +0000
Subject: [PATCH 1/2] - Update to 3.8.9 - libgnutls: leancrypto was added as
an interim option for PQC The library can now be built with leancrypto
instead of liboqs for post-quantum cryptography (PQC), when configured
with --with-leancrypto option instead of --with-liboqs. - libgnutls:
Experimental support for ML-DSA signature algorithm The library and
certtool now support ML-DSA signature algorithm as defined in FIPS 204
and based on draft-ietf-lamps-dilithium-certificates-04. This feature is
currently marked as experimental and can only be enabled when compiled
with --with-leancrypto or --with-liboqs. Contributed by David Dudas. -
libgnutls: Support for ML-KEM-1024 key encapsulation mechanism The
support for ML-KEM post-quantum key encapsulation mechanisms has been
extended to cover ML-KEM-1024, in addition to ML-KEM-768. MLKEM1024 is
only offered as SecP384r1MLKEM1024 hybrid as per
draft-kwiatkowski-tls-ecdhe-mlkem-03. - libgnutls: Fix potential DoS in
handling certificates with numerous name constraints, as a follow-up of
CVE-2024-12133 in libtasn1. The bundled copy of libtasn1 has also been
updated to the latest 4.20.0 release to complete the fix. Reported by
Bing Shi (#1553). [GNUTLS-SA-2025-02-07, CVSS: medium] [bsc#1236974,
CVE-2024-12243 - Licensing information moved to REAMDE.md, COPYING,
COPYING.LESSERv2 * Rebased gnutls-FIPS-140-3-references.patch * Rebased
gnutls-FIPS-TLS_KDF_selftest.patch * Rebased
gnutls-FIPS-jitterentropy.patch * Rebased
gnutls-disable-flaky-test-dtls-resume.patch * Rebased
gnutls-srp-test-SIGPIPE.patch * Rebased
gnutls-3.5.11-skip-trust-store-tests.patch * Add
gnutls-set-cligen-python-interp.patch
OBS-URL: https://build.opensuse.org/package/show/security:tls/gnutls?expand=0&rev=119
---
.gitattributes | 23 +
.gitignore | 1 +
baselibs.conf | 7 +
gnutls-3.5.11-skip-trust-store-tests.patch | 31 +
gnutls-3.8.5.tar.xz | 3 +
gnutls-3.8.5.tar.xz.sig | Bin 0 -> 119 bytes
gnutls-3.8.6.tar.xz | 3 +
gnutls-3.8.6.tar.xz.sig | Bin 0 -> 119 bytes
gnutls-3.8.8.tar.xz | 3 +
gnutls-3.8.8.tar.xz.sig | Bin 0 -> 580 bytes
gnutls-3.8.9.tar.xz | 3 +
gnutls-3.8.9.tar.xz.sig | Bin 0 -> 566 bytes
gnutls-FIPS-140-3-references.patch | 1240 +++++
gnutls-FIPS-HMAC-nettle-hogweed-gmp.patch | 120 +
gnutls-FIPS-TLS_KDF_selftest.patch | 31 +
...ls-FIPS-jitterentropy-deinit-threads.patch | 34 +
gnutls-FIPS-jitterentropy.patch | 225 +
gnutls-disable-flaky-test-dtls-resume.patch | 13 +
gnutls-set-cligen-python-interp.patch | 10 +
gnutls-skip-pqx-test.patch | 34 +
gnutls-srp-test-SIGPIPE.patch | 22 +
gnutls.changes | 4875 +++++++++++++++++
gnutls.keyring | 226 +
gnutls.rpmlintrc | 1 +
gnutls.spec | 401 ++
25 files changed, 7306 insertions(+)
create mode 100644 .gitattributes
create mode 100644 .gitignore
create mode 100644 baselibs.conf
create mode 100644 gnutls-3.5.11-skip-trust-store-tests.patch
create mode 100644 gnutls-3.8.5.tar.xz
create mode 100644 gnutls-3.8.5.tar.xz.sig
create mode 100644 gnutls-3.8.6.tar.xz
create mode 100644 gnutls-3.8.6.tar.xz.sig
create mode 100644 gnutls-3.8.8.tar.xz
create mode 100644 gnutls-3.8.8.tar.xz.sig
create mode 100644 gnutls-3.8.9.tar.xz
create mode 100644 gnutls-3.8.9.tar.xz.sig
create mode 100644 gnutls-FIPS-140-3-references.patch
create mode 100644 gnutls-FIPS-HMAC-nettle-hogweed-gmp.patch
create mode 100644 gnutls-FIPS-TLS_KDF_selftest.patch
create mode 100644 gnutls-FIPS-jitterentropy-deinit-threads.patch
create mode 100644 gnutls-FIPS-jitterentropy.patch
create mode 100644 gnutls-disable-flaky-test-dtls-resume.patch
create mode 100644 gnutls-set-cligen-python-interp.patch
create mode 100644 gnutls-skip-pqx-test.patch
create mode 100644 gnutls-srp-test-SIGPIPE.patch
create mode 100644 gnutls.changes
create mode 100644 gnutls.keyring
create mode 100644 gnutls.rpmlintrc
create mode 100644 gnutls.spec
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..9b03811
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,23 @@
+## Default LFS
+*.7z filter=lfs diff=lfs merge=lfs -text
+*.bsp filter=lfs diff=lfs merge=lfs -text
+*.bz2 filter=lfs diff=lfs merge=lfs -text
+*.gem filter=lfs diff=lfs merge=lfs -text
+*.gz filter=lfs diff=lfs merge=lfs -text
+*.jar filter=lfs diff=lfs merge=lfs -text
+*.lz filter=lfs diff=lfs merge=lfs -text
+*.lzma filter=lfs diff=lfs merge=lfs -text
+*.obscpio filter=lfs diff=lfs merge=lfs -text
+*.oxt filter=lfs diff=lfs merge=lfs -text
+*.pdf filter=lfs diff=lfs merge=lfs -text
+*.png filter=lfs diff=lfs merge=lfs -text
+*.rpm filter=lfs diff=lfs merge=lfs -text
+*.tbz filter=lfs diff=lfs merge=lfs -text
+*.tbz2 filter=lfs diff=lfs merge=lfs -text
+*.tgz filter=lfs diff=lfs merge=lfs -text
+*.ttf filter=lfs diff=lfs merge=lfs -text
+*.txz filter=lfs diff=lfs merge=lfs -text
+*.whl filter=lfs diff=lfs merge=lfs -text
+*.xz filter=lfs diff=lfs merge=lfs -text
+*.zip filter=lfs diff=lfs merge=lfs -text
+*.zst filter=lfs diff=lfs merge=lfs -text
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..57affb6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.osc
diff --git a/baselibs.conf b/baselibs.conf
new file mode 100644
index 0000000..0eb5642
--- /dev/null
+++ b/baselibs.conf
@@ -0,0 +1,7 @@
+libgnutls30
+ obsoletes "gnutls-"
+ provides "libgnutls30-hmac- = -%release"
+ obsoletes "libgnutls30-hmac- < -%release"
+libgnutls-devel
+ requires -libgnutls-
+ requires "libgnutls30- = "
diff --git a/gnutls-3.5.11-skip-trust-store-tests.patch b/gnutls-3.5.11-skip-trust-store-tests.patch
new file mode 100644
index 0000000..f02e4b6
--- /dev/null
+++ b/gnutls-3.5.11-skip-trust-store-tests.patch
@@ -0,0 +1,31 @@
+From: Andreas Stieger
+Date: Thu, 18 May 2017 10:31:42 +0200
+References: https://build.opensuse.org/request/show/493998
+Upstream: never
+
+trust-store test added in
+https://gitlab.com/gnutls/gnutls/commit/8d740ae87fae9c1237421dd24825b78103c5da36
+need ca-certificates-mozilla to run.
+
+[ 242s] FAIL: trust-store
+[ 242s] =================
+[ 242s]
+[ 242s] doit:64: no certificates were found in system trust store!
+[ 242s] FAIL trust-store (exit status: 1)
+
+But this would create a build cycle. Skip test.
+
+Index: gnutls-3.8.9/tests/trust-store.c
+===================================================================
+--- gnutls-3.8.9.orig/tests/trust-store.c
++++ gnutls-3.8.9/tests/trust-store.c
+@@ -42,6 +42,9 @@ static void tls_log_func(int level, cons
+
+ void doit(void)
+ {
++ /* building without ca-certificates-mozilla, skip test */
++ exit(77);
++
+ gnutls_certificate_credentials_t x509_cred;
+ int ret;
+
diff --git a/gnutls-3.8.5.tar.xz b/gnutls-3.8.5.tar.xz
new file mode 100644
index 0000000..4dab5d4
--- /dev/null
+++ b/gnutls-3.8.5.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:66269a2cfe0e1c2dabec87bdbbd8ab656f396edd9a40dd006978e003cfa52bfc
+size 6491504
diff --git a/gnutls-3.8.5.tar.xz.sig b/gnutls-3.8.5.tar.xz.sig
new file mode 100644
index 0000000000000000000000000000000000000000000000000000000000000000..ad2c423fee31a7b4ca0888c63810b24fdd2d696de7a11d26a2fa3f20cd718ec1
GIT binary patch
literal 119
zcmeAuWnmEGVvrS6WQlb<&0l81x}4QC>`PVYGLOwam3Ua0()c>AGjMSVz(nq3GyKzH
zh!zp_3}=sUzWm<7`>}D!!kfN|Cnvr9`s?}YP3_C_8U6>dAHDSG)DD-*NVR3BA9=}c
U-<&5n$5cxqV3`ab>&@jX04hZ=YybcN
literal 0
HcmV?d00001
diff --git a/gnutls-3.8.6.tar.xz b/gnutls-3.8.6.tar.xz
new file mode 100644
index 0000000..5d151c1
--- /dev/null
+++ b/gnutls-3.8.6.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2e1588aae53cb32d43937f1f4eca28febd9c0c7aa1734fc5dd61a7e81e0ebcdd
+size 6517476
diff --git a/gnutls-3.8.6.tar.xz.sig b/gnutls-3.8.6.tar.xz.sig
new file mode 100644
index 0000000000000000000000000000000000000000000000000000000000000000..6ce9f2999077fc182cefe83da37a374b6662dda56f309e9c9af2dae0974f5d9f
GIT binary patch
literal 119
zcmeAuWnmEGVvrS6WQlb<&0l81x}4QC>`PVYGLOwam3Ua0(pojIF>rATz(tZ6{+Sx(
zEIV8p|Il}9VXc71+)cKBqi?;E`nmXSN3V@B`$a28h8{5;Ma9x*a{SlWo_=ZxJbGAe
T=8DtO@A^6NcP9k(F)#oC=w>c|
literal 0
HcmV?d00001
diff --git a/gnutls-3.8.8.tar.xz b/gnutls-3.8.8.tar.xz
new file mode 100644
index 0000000..a4530d3
--- /dev/null
+++ b/gnutls-3.8.8.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ac4f020e583880b51380ed226e59033244bc536cad2623f2e26f5afa2939d8fb
+size 6696460
diff --git a/gnutls-3.8.8.tar.xz.sig b/gnutls-3.8.8.tar.xz.sig
new file mode 100644
index 0000000000000000000000000000000000000000000000000000000000000000..d353d7e0f26281a8da374e557e2dfa640030cca940a3257aced06f02c76b130f
GIT binary patch
literal 580
zcmV-K0=xZ*0zm`-0SEvq79j*iA|=DLZ#0LW$VqJ01%!^*=9qB>0%s|T2n`%{Wo~ak
zXKr;aZ*pe<3JDO_1%!^*=9qElb`Sr5W?CyG;^6S|h3W5*oo3+15H$kL2QQgLBQr7p
zJCF{7&!EgMkHt_((l*CtrLGpXatSbsYq-+-OL4+hLd!v-?F`b8K(?R~Qd74VtGPWc
zGhg1TirSY+ywPI9T%}J7hvP8fuY0WPbd3yoyB^$u@Lfd6R0FB<0nb{GmAz0tU^j5x
zGyz8y%>b5b%y`ALgWpM>r~D-BSfwT!DPq4{DdseUy%m}j@wiLNdSmzRW}H3_+-xkS
zxe+SNXU2$#x}(%i?WlmMj!k@D4A{EMiiuy|CA18L4c?x!wxg1e*~*x1otxS69)emh
z9UAw~Vy5iGS)un2@vZE#&iySqIzwpsHdu?}7VVOO2du9RK~;vBXR!SSUe*+bL6$6^
z;TTur2IqgDg*G<5Co-8seB5VGb%|u?P
z|5)qeDluTU7QmHj`RoGMA@HWOEqz}6`FrRYW-%5=#Y#q+gQzW2io6@VCd$&sgr?{9
zG+A(hxt=cDl8p?2eXHtYT`ZbX;TWX`fC2TXvsfASF}w!s&|(((oyapzS_xG=YcPZO
zFEKFYGsnpsdtuGq**D^2bY{O=-h)@xZxCurKW@{`=LpRNe^$1!=_Dl4a}iCNoi1ll
S$^<0JK>*=Arp+a=+ENl6G#h9D
literal 0
HcmV?d00001
diff --git a/gnutls-3.8.9.tar.xz b/gnutls-3.8.9.tar.xz
new file mode 100644
index 0000000..960ac27
--- /dev/null
+++ b/gnutls-3.8.9.tar.xz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:69e113d802d1670c4d5ac1b99040b1f2d5c7c05daec5003813c049b5184820ed
+size 6847364
diff --git a/gnutls-3.8.9.tar.xz.sig b/gnutls-3.8.9.tar.xz.sig
new file mode 100644
index 0000000000000000000000000000000000000000000000000000000000000000..e01debe8c00e277267f5aefbb86a5ea7f70884a3ee93d8066f7a3e11d2261f70
GIT binary patch
literal 566
zcmV-60?GY}0y6{v0SEvc79j*iA|=DLZ#0LW$VqJ01%!^*=9qB>0%xY?aR3Sl5Y`2R
zj@RaxaXxYo0Dx@kidKl>di45Z1Y-W`QR}N@UG~qIXRyPR`Xfqpdr?$bv9>GByoA%>
z!*V4z><%bCz;u+4MHT*k{qZiC0Rvm4S)e$)Zwb1r$S^O3v~CNIZ$4_!qg{E|I(-^M
zF4fOE0jJ{a%!rT4Dk#NRX2L2$49O#ZWOw9qcoRP-O@tCvMB-6iU=lTDGz-+WDgGK-
zGQh(hJ$eA
zDgSw;1HV0TYU(Ia#?_G;Y(%@tOWH-LAp~i({?#l@`)9};@psZM6Z)6po|SFR;3iE0
zaU3Q}YOv6yalZqVeQE|wrhP&>-s>!rK(S5h&|;RuCOSR`u(BC!S%@^?@F{jUQmHFD
zST(7}D`mf+jN)PiAf0mW@bmP9jp&T-L2B862~n=*E}ku~d6`Q$=K39q4@)Urb@VCc
zrg!Mjmf>p;an>N0C-|
E5HffYegFUf
literal 0
HcmV?d00001
diff --git a/gnutls-FIPS-140-3-references.patch b/gnutls-FIPS-140-3-references.patch
new file mode 100644
index 0000000..e5a10d8
--- /dev/null
+++ b/gnutls-FIPS-140-3-references.patch
@@ -0,0 +1,1240 @@
+Index: gnutls-3.8.9/configure.ac
+===================================================================
+--- gnutls-3.8.9.orig/configure.ac
++++ gnutls-3.8.9/configure.ac
+@@ -665,19 +665,19 @@ LT_INIT([disable-static,win32-dll,shared
+ AC_LIB_HAVE_LINKFLAGS(dl,, [#include ], [dladdr (0, 0);])
+
+ AC_ARG_ENABLE(fips140-mode,
+- AS_HELP_STRING([--enable-fips140-mode], [enable FIPS140-2 mode]),
++ AS_HELP_STRING([--enable-fips140-mode], [enable FIPS140-3 mode]),
+ enable_fips=$enableval, enable_fips=no)
+ AM_CONDITIONAL(ENABLE_FIPS140, test "$enable_fips" = "yes")
+ if [ test "$enable_fips" = "yes" ];then
+ if test "x$HAVE_LIBDL" = "xyes";then
+- AC_DEFINE([ENABLE_FIPS140], 1, [Enable FIPS140-2 mode])
++ AC_DEFINE([ENABLE_FIPS140], 1, [Enable FIPS140-3 mode])
+ AC_SUBST([FIPS140_LIBS], $LIBDL)
+ AC_ARG_WITH(fips140-key, AS_HELP_STRING([--with-fips140-key],
+ [specify the FIPS140 HMAC key for integrity]),
+ fips_key="$withval",
+ fips_key="orboDeJITITejsirpADONivirpUkvarP")
+
+- AC_DEFINE_UNQUOTED([FIPS_KEY], ["$fips_key"], [The FIPS140-2 integrity key])
++ AC_DEFINE_UNQUOTED([FIPS_KEY], ["$fips_key"], [The FIPS140-3 integrity key])
+
+ AC_ARG_WITH(fips140-module-name, AS_HELP_STRING([--with-fips140-module-name],
+ [specify the FIPS140 module name]),
+Index: gnutls-3.8.9/doc/cha-gtls-app.texi
+===================================================================
+--- gnutls-3.8.9.orig/doc/cha-gtls-app.texi
++++ gnutls-3.8.9/doc/cha-gtls-app.texi
+@@ -222,7 +222,7 @@ CPU. The currently available options are
+ @end itemize
+
+ @item @code{GNUTLS_FORCE_FIPS_MODE}
+-@tab In setups where GnuTLS is compiled with support for FIPS140-2 (see @ref{FIPS140-2 mode})
++@tab In setups where GnuTLS is compiled with support for FIPS140-3 (see @ref{FIPS140-3 mode})
+ if set to one it will force the FIPS mode enablement.
+
+ @end multitable
+Index: gnutls-3.8.9/doc/cha-internals.texi
+===================================================================
+--- gnutls-3.8.9.orig/doc/cha-internals.texi
++++ gnutls-3.8.9/doc/cha-internals.texi
+@@ -14,7 +14,7 @@ happens inside the black box.
+ * TLS Hello Extension Handling::
+ * Cryptographic Backend::
+ * Random Number Generators-internals::
+-* FIPS140-2 mode::
++* FIPS140-3 mode::
+ @end menu
+
+ @node The TLS Protocol
+@@ -529,7 +529,7 @@ For more information see @ref{Hardware s
+
+ GnuTLS provides two random generators. The default, and the AES-DRBG random
+ generator which is only used when the library is compiled with support for
+-FIPS140-2 and the system is in FIPS140-2 mode.
++FIPS140-3 and the system is in FIPS140-3 mode.
+
+ @subheading The default generator - inner workings
+
+@@ -659,23 +659,23 @@ two distinct times, and being able to re
+ after observing the output of the PRNG. Given the approach described
+ on the above paragraph, all levels are immune to such attack.
+
+-@node FIPS140-2 mode
+-@section FIPS140-2 mode
++@node FIPS140-3 mode
++@section FIPS140-3 mode
+
+-GnuTLS can operate in a special mode for FIPS140-2. That mode of operation
+-is for the conformance to NIST's FIPS140-2 publication, which consists of policies
++GnuTLS can operate in a special mode for FIPS140-3. That mode of operation
++is for the conformance to NIST's FIPS140-3 publication, which consists of policies
+ for cryptographic modules (such as software libraries). Its implementation in
+ GnuTLS is designed for Red Hat Enterprise Linux, and can only be enabled
+ when the library is explicitly compiled with the '--enable-fips140-mode'
+ configure option.
+
+-There are two distinct library states with regard to FIPS140-2: the FIPS140-2
++There are two distinct library states with regard to FIPS140-3: the FIPS140-3
+ mode is @emph{installed} if @code{/etc/system-fips} is present, and the
+-FIPS140-2 mode is @emph{enabled} if @code{/proc/sys/crypto/fips_enabled}
++FIPS140-3 mode is @emph{enabled} if @code{/proc/sys/crypto/fips_enabled}
+ contains '1', which is typically set with the ``fips=1'' kernel command line
+ option.
+
+-When the FIPS140-2 mode is installed, the operation of the library is modified
++When the FIPS140-3 mode is installed, the operation of the library is modified
+ as follows.
+
+ @itemize
+@@ -684,12 +684,12 @@ as follows.
+ @item Algorithm self-tests are run on library load
+ @end itemize
+
+-When the FIPS140-2 mode is enabled, The operation of the library is in addition
++When the FIPS140-3 mode is enabled, The operation of the library is in addition
+ modified as follows.
+
+ @itemize
+-@item Only approved by FIPS140-2 algorithms are enabled
+-@item Only approved by FIPS140-2 key lengths are allowed for key generation
++@item Only approved by FIPS140-3 algorithms are enabled
++@item Only approved by FIPS140-3 key lengths are allowed for key generation
+ @item Any cryptographic operation will be refused if any of the self-tests failed
+ @end itemize
+
+@@ -698,7 +698,7 @@ There are also few environment variables
+ environment variable @code{GNUTLS_SKIP_FIPS_INTEGRITY_CHECKS} will disable
+ the library integrity tests on startup, and the variable
+ @code{GNUTLS_FORCE_FIPS_MODE} can be set to force a value from
+-@ref{gnutls_fips_mode_t}, i.e., '1' will enable the FIPS140-2
++@ref{gnutls_fips_mode_t}, i.e., '1' will enable the FIPS140-3
+ mode, while '0' will disable it.
+
+ The integrity checks for the dependent libraries and GnuTLS are performed
+@@ -706,20 +706,20 @@ using '.hmac' files which are present at
+ key for the operations can be provided on compile-time with the configure
+ option '--with-fips140-key'. The MAC algorithm used is HMAC-SHA256.
+
+-On runtime an application can verify whether the library is in FIPS140-2
++On runtime an application can verify whether the library is in FIPS140-3
+ mode using the @funcref{gnutls_fips140_mode_enabled} function.
+
+-@subheading Relaxing FIPS140-2 requirements
++@subheading Relaxing FIPS140-3 requirements
+
+ The library by default operates in a strict enforcing mode, ensuring that
+-all constraints imposed by the FIPS140-2 specification are enforced. However
++all constraints imposed by the FIPS140-3 specification are enforced. However
+ the application can relax these requirements via @funcref{gnutls_fips140_set_mode}
+ which can switch to alternative modes as in @ref{gnutls_fips_mode_t}.
+
+ @showenumdesc{gnutls_fips_mode_t,The @code{gnutls_@-fips_@-mode_t} enumeration.}
+
+ The intention of this API is to be used by applications which may run in
+-FIPS140-2 mode, while they utilize few algorithms not in the allowed set,
++FIPS140-3 mode, while they utilize few algorithms not in the allowed set,
+ e.g., for non-security related purposes. In these cases applications should
+ wrap the non-compliant code within blocks like the following.
+
+@@ -748,9 +748,9 @@ if (gnutls_fips140_mode_enabled())
+ The reason of the @code{GNUTLS_FIPS140_SET_MODE_THREAD} flag in the
+ previous calls is to localize the change in the mode. Note also, that
+ such a block has no effect when the library is not operating
+-under FIPS140-2 mode, and thus it can be considered a no-op.
++under FIPS140-3 mode, and thus it can be considered a no-op.
+
+-Applications could also switch FIPS140-2 mode explicitly off, by calling
++Applications could also switch FIPS140-3 mode explicitly off, by calling
+ @example
+ gnutls_fips140_set_mode(GNUTLS_FIPS140_LAX, 0);
+ @end example
+@@ -768,7 +768,7 @@ performed within a given context.
+
+ @showfuncD{gnutls_fips140_context_init,gnutls_fips140_context_deinit,gnutls_fips140_push_context,gnutls_fips140_pop_context}
+
+-The @code{gnutls_fips140_context_t} represents the FIPS140-2 mode of
++The @code{gnutls_fips140_context_t} represents the FIPS140-3 mode of
+ operation. It can be attached to the current execution thread with
+ @funcref{gnutls_fips140_push_context} and its internal state will be
+ updated until it is detached with
+Index: gnutls-3.8.9/doc/enums.texi
+===================================================================
+--- gnutls-3.8.9.orig/doc/enums.texi
++++ gnutls-3.8.9/doc/enums.texi
+@@ -1230,7 +1230,7 @@ application traffic secret is installed
+ @c gnutls_fips_mode_t
+ @table @code
+ @item GNUTLS_@-FIPS140_@-DISABLED
+-The FIPS140-2 mode is disabled.
++The FIPS140-3 mode is disabled.
+ @item GNUTLS_@-FIPS140_@-STRICT
+ The default mode; all forbidden operations will cause an
+ operation failure via error code.
+@@ -1238,8 +1238,8 @@ operation failure via error code.
+ A transient state during library initialization. That state
+ cannot be set or seen by applications.
+ @item GNUTLS_@-FIPS140_@-LAX
+-The library still uses the FIPS140-2 relevant algorithms but all
+-forbidden by FIPS140-2 operations are allowed; this is useful when the
++The library still uses the FIPS140-3 relevant algorithms but all
++forbidden by FIPS140-3 operations are allowed; this is useful when the
+ application is aware of the followed security policy, and needs
+ to utilize disallowed operations for other reasons (e.g., compatibility).
+ @item GNUTLS_@-FIPS140_@-LOG
+Index: gnutls-3.8.9/doc/functions/gnutls_fips140_set_mode
+===================================================================
+--- gnutls-3.8.9.orig/doc/functions/gnutls_fips140_set_mode
++++ gnutls-3.8.9/doc/functions/gnutls_fips140_set_mode
+@@ -3,7 +3,7 @@
+
+
+ @deftypefun {void} {gnutls_fips140_set_mode} (gnutls_fips_mode_t @var{mode}, unsigned @var{flags})
+-@var{mode}: the FIPS140-2 mode to switch to
++@var{mode}: the FIPS140-3 mode to switch to
+
+ @var{flags}: should be zero or @code{GNUTLS_FIPS140_SET_MODE_THREAD}
+
+@@ -12,13 +12,13 @@ That function is not thread-safe when ch
+ behavior with no flags after threads are created is undefined.
+
+ When the flag @code{GNUTLS_FIPS140_SET_MODE_THREAD} is specified
+-then this call will change the FIPS140-2 mode for this particular
++then this call will change the FIPS140-3 mode for this particular
+ thread and not for the whole process. That way an application
+ can utilize this function to set and reset mode for specific
+ operations.
+
+ This function never fails but will be a no-op if used when
+-the library is not in FIPS140-2 mode. When asked to switch to unknown
++the library is not in FIPS140-3 mode. When asked to switch to unknown
+ values for @code{mode} or to @code{GNUTLS_FIPS140_SELFTESTS} mode, the library
+ switches to @code{GNUTLS_FIPS140_STRICT} mode.
+
+Index: gnutls-3.8.9/doc/gnutls.html
+===================================================================
+--- gnutls-3.8.9.orig/doc/gnutls.html
++++ gnutls-3.8.9/doc/gnutls.html
+@@ -485,7 +485,7 @@ Documentation License”.
+ 11.4 TLS Extension Handling
+ 11.5 Cryptographic Backend
+ 11.6 Random Number Generators
+- 11.7 FIPS140-2 mode
++ 11.7 FIPS140-3 mode
+
+ Appendix A Upgrading from previous versions
+ Appendix B Support
+@@ -9028,7 +9028,7 @@ CPU. The currently available options are
+ 0x200000: Enable VIA PHE
+ 0x400000: Enable VIA PHE SHA512
+
+-GNUTLS_FORCE_FIPS_MODE | In setups where GnuTLS is compiled with support for FIPS140-2 (see FIPS140-2 mode)
++ |
GNUTLS_FORCE_FIPS_MODE | In setups where GnuTLS is compiled with support for FIPS140-3 (see FIPS140-3 mode)
+ if set to one it will force the FIPS mode enablement. |
+
+
+@@ -18452,7 +18452,7 @@ None:
+ --inline-commands-prefix=str Change the default delimiter for inline commands
+ --provider=file Specify the PKCS #11 provider library
+ - file must pre-exist
+- --fips140-mode Reports the status of the FIPS140-2 mode in gnutls library
++ --fips140-mode Reports the status of the FIPS140-3 mode in gnutls library
+ --list-config Reports the configuration of the library
+ --logfile=str Redirect informational messages to a specific file
+ --keymatexport=str Label used for exporting keying material
+@@ -19472,7 +19472,7 @@ happens inside the black box.
+ TLS Extension Handling
+ Cryptographic Backend
+ Random Number Generators
+-FIPS140-2 mode
++FIPS140-3 mode
+
+
+
+-11.7 FIPS140-2 mode ¶
++11.7 FIPS140-3 mode ¶
+
+-GnuTLS can operate in a special mode for FIPS140-2. That mode of operation
+-is for the conformance to NIST’s FIPS140-2 publication, which consists of policies
++
GnuTLS can operate in a special mode for FIPS140-3. That mode of operation
++is for the conformance to NIST’s FIPS140-3 publication, which consists of policies
+ for cryptographic modules (such as software libraries). Its implementation in
+ GnuTLS is designed for Red Hat Enterprise Linux, and can only be enabled
+ when the library is explicitly compiled with the ’–enable-fips140-mode’
+ configure option.
+
+-There are two distinct library states with regard to FIPS140-2: the FIPS140-2
++
There are two distinct library states with regard to FIPS140-3: the FIPS140-3
+ mode is installed if /etc/system-fips
is present, and the
+-FIPS140-2 mode is enabled if /proc/sys/crypto/fips_enabled
++FIPS140-3 mode is enabled if /proc/sys/crypto/fips_enabled
+ contains ’1’, which is typically set with the “fips=1” kernel command line
+ option.
+
+-When the FIPS140-2 mode is installed, the operation of the library is modified
++
When the FIPS140-3 mode is installed, the operation of the library is modified
+ as follows.
+
+
+@@ -20166,12 +20166,12 @@ as follows.
+ - Algorithm self-tests are run on library load
+
+
+-When the FIPS140-2 mode is enabled, The operation of the library is in addition
++
When the FIPS140-3 mode is enabled, The operation of the library is in addition
+ modified as follows.
+
+
+-- Only approved by FIPS140-2 algorithms are enabled
+-
- Only approved by FIPS140-2 key lengths are allowed for key generation
++
- Only approved by FIPS140-3 algorithms are enabled
++
- Only approved by FIPS140-3 key lengths are allowed for key generation
+
- Any cryptographic operation will be refused if any of the self-tests failed
+
+
+@@ -20180,7 +20180,7 @@ modified as follows.
+ environment variable GNUTLS_SKIP_FIPS_INTEGRITY_CHECKS
will disable
+ the library integrity tests on startup, and the variable
+ GNUTLS_FORCE_FIPS_MODE
can be set to force a value from
+-Figure 11.5, i.e., ’1’ will enable the FIPS140-2
++Figure 11.5, i.e., ’1’ will enable the FIPS140-3
+ mode, while ’0’ will disable it.
+
+ The integrity checks for the dependent libraries and GnuTLS are performed
+@@ -20188,13 +20188,13 @@ using ’.hmac’ files which ar
+ key for the operations can be provided on compile-time with the configure
+ option ’–with-fips140-key’. The MAC algorithm used is HMAC-SHA256.
+
+-On runtime an application can verify whether the library is in FIPS140-2
++
On runtime an application can verify whether the library is in FIPS140-3
+ mode using the gnutls_fips140_mode_enabled function.
+
+-Relaxing FIPS140-2 requirements ¶
++Relaxing FIPS140-3 requirements ¶
+
+ The library by default operates in a strict enforcing mode, ensuring that
+-all constraints imposed by the FIPS140-2 specification are enforced. However
++all constraints imposed by the FIPS140-3 specification are enforced. However
+ the application can relax these requirements via gnutls_fips140_set_mode
+ which can switch to alternative modes as in Figure 11.5.
+
+@@ -20203,7 +20203,7 @@ which can switch to alternative modes as
+
+
+ GNUTLS_FIPS140_DISABLED
+-The FIPS140-2 mode is disabled.
++
The FIPS140-3 mode is disabled.
+
+ GNUTLS_FIPS140_STRICT
+ The default mode; all forbidden operations will cause an
+@@ -20214,8 +20214,8 @@ operation failure via error code.
+ cannot be set or seen by applications.
+
+ GNUTLS_FIPS140_LAX
+-The library still uses the FIPS140-2 relevant algorithms but all
+-forbidden by FIPS140-2 operations are allowed; this is useful when the
++
The library still uses the FIPS140-3 relevant algorithms but all
++forbidden by FIPS140-3 operations are allowed; this is useful when the
+ application is aware of the followed security policy, and needs
+ to utilize disallowed operations for other reasons (e.g., compatibility).
+
+@@ -20226,7 +20226,7 @@ to a message to the audit callback funct
+
+ Figure 11.5: The gnutls_fips_mode_t
enumeration.
+ The intention of this API is to be used by applications which may run in
+-FIPS140-2 mode, while they utilize few algorithms not in the allowed set,
++FIPS140-3 mode, while they utilize few algorithms not in the allowed set,
+ e.g., for non-security related purposes. In these cases applications should
+ wrap the non-compliant code within blocks like the following.
+
+@@ -20255,9 +20255,9 @@ if (gnutls_fips140_mode_enabled())
+ The reason of the GNUTLS_FIPS140_SET_MODE_THREAD
flag in the
+ previous calls is to localize the change in the mode. Note also, that
+ such a block has no effect when the library is not operating
+-under FIPS140-2 mode, and thus it can be considered a no-op.
++under FIPS140-3 mode, and thus it can be considered a no-op.
+
+-Applications could also switch FIPS140-2 mode explicitly off, by calling
++
Applications could also switch FIPS140-3 mode explicitly off, by calling
+
+
gnutls_fips140_set_mode(GNUTLS_FIPS140_LAX, 0);
+
+@@ -20280,7 +20280,7 @@ performed within a given context.
+ int gnutls_fips140_pop_context ( void)
+
+
+-The gnutls_fips140_context_t
represents the FIPS140-2 mode of
++
The gnutls_fips140_context_t
represents the FIPS140-3 mode of
+ operation. It can be attached to the current execution thread with
+ gnutls_fips140_push_context and its internal state will be
+ updated until it is detached with
+@@ -20653,8 +20653,8 @@ Previous:
+-GnuTLS has support for the FIPS 140-2 certification under Red Hat Enterprise Linux.
+-See FIPS140-2 mode for more information.
++
GnuTLS has support for the FIPS 140-3 certification under Red Hat Enterprise Linux.
++See FIPS140-3 mode for more information.
+
+
+
+@@ -24575,7 +24575,7 @@ unusable. This function is not thread-s
+ gnutls_fips140_set_mode ¶
+
+ - Function:
void
gnutls_fips140_set_mode (gnutls_fips_mode_t mode, unsigned flags)
¶
+-mode: the FIPS140-2 mode to switch to
++
mode: the FIPS140-3 mode to switch to
+
+ flags: should be zero or GNUTLS_FIPS140_SET_MODE_THREAD
+
+@@ -24584,13 +24584,13 @@ unusable. This function is not thread-s
+ behavior with no flags after threads are created is undefined.
+
+ When the flag GNUTLS_FIPS140_SET_MODE_THREAD
is specified
+-then this call will change the FIPS140-2 mode for this particular
++then this call will change the FIPS140-3 mode for this particular
+ thread and not for the whole process. That way an application
+ can utilize this function to set and reset mode for specific
+ operations.
+
+ This function never fails but will be a no-op if used when
+-the library is not in FIPS140-2 mode. When asked to switch to unknown
++the library is not in FIPS140-3 mode. When asked to switch to unknown
+ values for mode
or to GNUTLS_FIPS140_SELFTESTS
mode, the library
+ switches to GNUTLS_FIPS140_STRICT
mode.
+
+@@ -47011,7 +47011,7 @@ Next: | gnutls_fingerprint | Core TLS API |
+ | gnutls_fips140_context_deinit | Core TLS API |
+ | gnutls_fips140_context_init | Core TLS API |
+- | gnutls_fips140_get_operation_state | FIPS140-2 mode |
++ | gnutls_fips140_get_operation_state | FIPS140-3 mode |
+ | gnutls_fips140_get_operation_state | Core TLS API |
+ | gnutls_fips140_mode_enabled | Core TLS API |
+ | gnutls_fips140_pop_context | Core TLS API |
+Index: gnutls-3.8.9/doc/gnutls.info-3
+===================================================================
+--- gnutls-3.8.9.orig/doc/gnutls.info-3
++++ gnutls-3.8.9/doc/gnutls.info-3
+@@ -2108,7 +2108,7 @@ to ‘more’. Both will exit with a st
+ --inline-commands-prefix=str Change the default delimiter for inline commands
+ --provider=file Specify the PKCS #11 provider library
+ - file must pre-exist
+- --fips140-mode Reports the status of the FIPS140-2 mode in gnutls library
++ --fips140-mode Reports the status of the FIPS140-3 mode in gnutls library
+ --list-config Reports the configuration of the library
+ --logfile=str Redirect informational messages to a specific file
+ --keymatexport=str Label used for exporting keying material
+@@ -3261,7 +3261,7 @@ to know what happens inside the black bo
+ * TLS Hello Extension Handling::
+ * Cryptographic Backend::
+ * Random Number Generators-internals::
+-* FIPS140-2 mode::
++* FIPS140-3 mode::
+
+
+ File: gnutls.info, Node: The TLS Protocol, Next: TLS Handshake Protocol, Up: Internal architecture of GnuTLS
+@@ -3789,7 +3789,7 @@ and abstract key types::.
+ kernel implementation of ‘/dev/crypto’.
+
+
+-File: gnutls.info, Node: Random Number Generators-internals, Next: FIPS140-2 mode, Prev: Cryptographic Backend, Up: Internal architecture of GnuTLS
++File: gnutls.info, Node: Random Number Generators-internals, Next: FIPS140-3 mode, Prev: Cryptographic Backend, Up: Internal architecture of GnuTLS
+
+ 11.6 Random Number Generators
+ =============================
+@@ -3799,7 +3799,7 @@ About the generators
+
+ GnuTLS provides two random generators. The default, and the AES-DRBG
+ random generator which is only used when the library is compiled with
+-support for FIPS140-2 and the system is in FIPS140-2 mode.
++support for FIPS140-3 and the system is in FIPS140-3 mode.
+
+ The default generator - inner workings
+ --------------------------------------
+@@ -4030,7 +4030,7 @@ in *note Figure 11.5: gnutls_fips_mode_t
+ Figure 11.5: The ‘gnutls_fips_mode_t’ enumeration.
+
+ The intention of this API is to be used by applications which may run in
+-FIPS140-2 mode, while they utilize few algorithms not in the allowed
++FIPS140-3 mode, while they utilize few algorithms not in the allowed
+ set, e.g., for non-security related purposes. In these cases
+ applications should wrap the non-compliant code within blocks like the
+ following.
+@@ -4054,10 +4054,10 @@ are macros to simplify the following seq
+
+ The reason of the ‘GNUTLS_FIPS140_SET_MODE_THREAD’ flag in the previous
+ calls is to localize the change in the mode. Note also, that such a
+-block has no effect when the library is not operating under FIPS140-2
++block has no effect when the library is not operating under FIPS140-3
+ mode, and thus it can be considered a no-op.
+
+-Applications could also switch FIPS140-2 mode explicitly off, by calling
++Applications could also switch FIPS140-3 mode explicitly off, by calling
+ gnutls_fips140_set_mode(GNUTLS_FIPS140_LAX, 0);
+
+ Service indicator
+@@ -4539,8 +4539,8 @@ There are certifications from national o
+ practices, such as unit testing and reliance on well known crypto
+ primitives.
+
+-GnuTLS has support for the FIPS 140-2 certification under Red Hat
+-Enterprise Linux. See *note FIPS140-2 mode:: for more information.
++GnuTLS has support for the FIPS 140-3 certification under Red Hat
++Enterprise Linux. See *note FIPS140-3 mode:: for more information.
+
+
+ File: gnutls.info, Node: Error codes, Next: Supported ciphersuites, Prev: Support, Up: Top
+@@ -9015,7 +9015,7 @@ gnutls_fips140_set_mode
+
+ -- Function: void gnutls_fips140_set_mode (gnutls_fips_mode_t MODE,
+ unsigned FLAGS)
+- MODE: the FIPS140-2 mode to switch to
++ MODE: the FIPS140-3 mode to switch to
+
+ FLAGS: should be zero or ‘GNUTLS_FIPS140_SET_MODE_THREAD’
+
+Index: gnutls-3.8.9/doc/invoke-gnutls-cli.texi
+===================================================================
+--- gnutls-3.8.9.orig/doc/invoke-gnutls-cli.texi
++++ gnutls-3.8.9/doc/invoke-gnutls-cli.texi
+@@ -102,7 +102,7 @@ None:
+ --inline-commands-prefix=str Change the default delimiter for inline commands
+ --provider=file Specify the PKCS #11 provider library
+ - file must pre-exist
+- --fips140-mode Reports the status of the FIPS140-2 mode in gnutls library
++ --fips140-mode Reports the status of the FIPS140-3 mode in gnutls library
+ --list-config Reports the configuration of the library
+ --logfile=str Redirect informational messages to a specific file
+ --keymatexport=str Label used for exporting keying material
+Index: gnutls-3.8.9/doc/manpages/gnutls-cli.1
+===================================================================
+--- gnutls-3.8.9.orig/doc/manpages/gnutls-cli.1
++++ gnutls-3.8.9/doc/manpages/gnutls-cli.1
+@@ -398,7 +398,7 @@ Specify the PKCS #11 provider library.
+ This will override the default options in /etc/gnutls/pkcs11.conf
+ .TP
+ .NOP \f\*[B-Font]\-\-fips140\-mode\f[]
+-Reports the status of the FIPS140-2 mode in gnutls library.
++Reports the status of the FIPS140-3 mode in gnutls library.
+ .sp
+ .TP
+ .NOP \f\*[B-Font]\-\-list\-config\f[]
+Index: gnutls-3.8.9/doc/reference/html/gnutls-gnutls.html
+===================================================================
+--- gnutls-3.8.9.orig/doc/reference/html/gnutls-gnutls.html
++++ gnutls-3.8.9/doc/reference/html/gnutls-gnutls.html
+@@ -20874,12 +20874,12 @@ gnutls_fips140_set_mode (GNUTLS_FIPS140_SET_MODE_THREAD
is specified
+-then this call will change the FIPS140-2 mode for this particular
++then this call will change the FIPS140-3 mode for this particular
+ thread and not for the whole process. That way an application
+ can utilize this function to set and reset mode for specific
+ operations.
+ This function never fails but will be a no-op if used when
+-the library is not in FIPS140-2 mode. When asked to switch to unknown
++the library is not in FIPS140-3 mode. When asked to switch to unknown
+ values for mode
+ or to GNUTLS_FIPS140_SELFTESTS
mode, the library
+ switches to GNUTLS_FIPS140_STRICT
mode.
+@@ -20894,7 +20894,7 @@ switches to mode
+-the FIPS140-2 mode to switch to |
++the FIPS140-3 mode to switch to |
+ |
+
+
+@@ -26035,7 +26035,7 @@ encryption
+
+
+
enum gnutls_fips_mode_t
+-
Enumeration of different operational modes under FIPS140-2.
++
Enumeration of different operational modes under FIPS140-3.
+