diff --git a/coturn-no-FIPS-140-mode.patch b/coturn-no-FIPS-140-mode.patch new file mode 100644 index 0000000..3847d60 --- /dev/null +++ b/coturn-no-FIPS-140-mode.patch @@ -0,0 +1,31 @@ +From: Nicholas Guriev +Date: Thu, 02 Jun 2022 12:34:17 +0300 +Subject: Do not check FIPS 140 mode + It is not available in OpenSSL as packaged in Debian. The OPENSSL_FIPS macro + appeared in ancient OpenSSL sources but was never defined. + https://sources.debian.org/src/openssl/1.1.1n-0%2Bdeb11u2/crypto/o_fips.c/ + +--- + src/client/ns_turn_msg.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/src/client/ns_turn_msg.c ++++ b/src/client/ns_turn_msg.c +@@ -244,7 +244,7 @@ int stun_produce_integrity_key_str(const + unsigned int keylen = 0; + EVP_MD_CTX ctx; + EVP_MD_CTX_init(&ctx); +-#if defined EVP_MD_CTX_FLAG_NON_FIPS_ALLOW && !defined(LIBRESSL_VERSION_NUMBER) ++#ifdef OPENSSL_FIPS + if (FIPS_mode()) { + EVP_MD_CTX_set_flags(&ctx,EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); + } +@@ -256,7 +256,7 @@ int stun_produce_integrity_key_str(const + #else + unsigned int keylen = 0; + EVP_MD_CTX *ctx = EVP_MD_CTX_new(); +-#if defined EVP_MD_CTX_FLAG_NON_FIPS_ALLOW && ! defined(LIBRESSL_VERSION_NUMBER) ++#ifdef OPENSSL_FIPS + if (FIPS_mode()) { + EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW); + } diff --git a/coturn.changes b/coturn.changes index e3e906a..a5d7312 100644 --- a/coturn.changes +++ b/coturn.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Mar 6 17:09:44 UTC 2023 - Carsten Ziepke + +- Add coturn-no-FIPS-140-mode.patch, fixes build against OpenSSL 3.0 + ------------------------------------------------------------------- Sun Dec 4 12:27:54 UTC 2022 - Michael Ströder diff --git a/coturn.spec b/coturn.spec index 7ed3c85..7c486ab 100644 --- a/coturn.spec +++ b/coturn.spec @@ -1,7 +1,7 @@ # # spec file for package coturn # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -40,6 +40,8 @@ Source6: %{name}.firewalld Source7: README.SUSE Source8: %{name}-apparmor-usr.bin.turnserver Source9: %{name}@.service +# PATCH-FIX-UPSTREAM - coturn-no-FIPS-140-mode.patch - see https://github.com/coturn/coturn/pull/916/commits/518094e0d30bb04364b6751841cd55172a33b539 +Patch0: coturn-no-FIPS-140-mode.patch BuildRequires: fdupes BuildRequires: firewall-macros BuildRequires: libevent-devel >= 2.0.0