Dominique Leuenberger 2023-03-17 16:02:16 +00:00 committed by Git OBS Bridge
commit da025a7fb9
3 changed files with 46 additions and 1 deletions

View File

@ -0,0 +1,37 @@
From 4793486850b588ca5fd5f17896f5cf6bd4bb747c Mon Sep 17 00:00:00 2001
From: Otto Hollmann <otto.hollmann@suse.com>
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;

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Mar 15 08:21:19 UTC 2023 - Otto Hollmann <otto.hollmann@suse.com>
- Add support for OpenSSL 3.1.x
* Add ibmswtpm2-OpenSSL-3.1.patch
-------------------------------------------------------------------
Sat Sep 24 08:23:47 UTC 2022 - Dirk Müller <dmueller@suse.com>

View File

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