From 5df3f8cbd754e795e8cab91996306eaee1f5d8407dd4fc6dffe9d33c5713730c Mon Sep 17 00:00:00 2001 From: Michal Suchanek Date: Wed, 15 Mar 2023 11:11:40 +0000 Subject: [PATCH] Accepting request 1072048 from home:ohollmann:branches:security:tls:unstable - Add support for OpenSSL 3.1.x * Add ibmswtpm2-OpenSSL-3.1.patch OBS-URL: https://build.opensuse.org/request/show/1072048 OBS-URL: https://build.opensuse.org/package/show/security/ibmswtpm2?expand=0&rev=28 --- ibmswtpm2-OpenSSL-3.1.patch | 37 +++++++++++++++++++++++++++++++++++++ ibmswtpm2.changes | 6 ++++++ ibmswtpm2.spec | 4 +++- 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 ibmswtpm2-OpenSSL-3.1.patch diff --git a/ibmswtpm2-OpenSSL-3.1.patch b/ibmswtpm2-OpenSSL-3.1.patch new file mode 100644 index 0000000..472cd49 --- /dev/null +++ b/ibmswtpm2-OpenSSL-3.1.patch @@ -0,0 +1,37 @@ +From 4793486850b588ca5fd5f17896f5cf6bd4bb747c Mon Sep 17 00:00:00 2001 +From: Otto Hollmann +Date: Wed, 15 Mar 2023 09:51:57 +0100 +Subject: [PATCH] Add support for OpenSSL 3.1.x + +--- + src/TpmToOsslMath.h | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/src/TpmToOsslMath.h b/src/TpmToOsslMath.h +index 13e5070..eedec34 100644 +--- a/src/TpmToOsslMath.h ++++ b/src/TpmToOsslMath.h +@@ -72,16 +72,20 @@ + + #define SYMMETRIC_ALIGNMENT RADIX_BYTES + +-#if OPENSSL_VERSION_NUMBER > 0x300000ffL ++/* ++ * As of release 3.0.0, OPENSSL_VERSION_NUMBER is a combination of the ++ * major (M), minor (NN) and patch (PP) version into a single integer 0xMNN00PP0L ++ */ ++#if OPENSSL_VERSION_NUMBER > 0x30100ff0L + // Check the bignum_st definition in crypto/bn/bn_lcl.h or crypto/bn/bn_local.h and either update + // the version check or provide the new definition for this version. +-// Currently safe for all 3.0.n.a ++// Currently safe for all 3.1.x + # error Untested OpenSSL version + #elif OPENSSL_VERSION_NUMBER >= 0x10100000L + // from crypto/bn/bn_lcl.h + struct bignum_st { + BN_ULONG *d; +- int top; ++ int top; + + int dmax; + int neg; diff --git a/ibmswtpm2.changes b/ibmswtpm2.changes index ee2f321..74a06f9 100644 --- a/ibmswtpm2.changes +++ b/ibmswtpm2.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Mar 15 08:21:19 UTC 2023 - Otto Hollmann + +- Add support for OpenSSL 3.1.x + * Add ibmswtpm2-OpenSSL-3.1.patch + ------------------------------------------------------------------- Sat Sep 24 08:23:47 UTC 2022 - Dirk Müller diff --git a/ibmswtpm2.spec b/ibmswtpm2.spec index 5f60999..c0ad692 100644 --- a/ibmswtpm2.spec +++ b/ibmswtpm2.spec @@ -1,7 +1,7 @@ # # spec file for package ibmswtpm2 # -# 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 @@ -33,6 +33,8 @@ Source: https://sourceforge.net/projects/ibmswtpm2/files/ibmtpm%{version Patch0: makefile.patch Patch1: ibmswtpm2-TcpServerPosix-Fix-use-of-uninitialized-value.patch Patch2: ibmswtpm2-NVDynamic-Fix-use-of-uninitialized-value.patch +# PATCH-FIX-OPENSUSE: not yet merged https://github.com/kgoldman/ibmswtpm2/pull/9 +Patch3: ibmswtpm2-OpenSSL-3.1.patch BuildRequires: libopenssl-devel >= 1.0 %description