--- /dev/null
+--- ibmswtpm2-1661/src/TpmToOsslMath.h.orig 2021-01-23 00:14:01.000000000 +0100
++++ ibmswtpm2-1661/src/TpmToOsslMath.h 2022-07-01 22:24:21.822533492 +0200
+@@ -73,7 +73,7 @@
+
+ #define SYMMETRIC_ALIGNMENT RADIX_BYTES
+
+-#if OPENSSL_VERSION_NUMBER >= 0x10200000L
++#if OPENSSL_VERSION_NUMBER >= 0x30100000L
+ // Check the bignum_st definition in crypto/bn/bn_lcl.h and either update the
+ // version check or provide the new definition for this version.
+ # error Untested OpenSSL version
Summary(pl.UTF-8): Programowy TPM 2.0 stworzony przez IBM
Name: ibmswtpm2
Version: 1661
-Release: 1
+Release: 2
License: BSD
Group: Development/Tools
Source0: https://downloads.sourceforge.net/ibmswtpm2/ibmtpm%{version}.tar.gz
# Source0-md5: df691c9c548023c1126742ff9213c006
+Patch0: %{name}-openssl3.patch
URL: https://sourceforge.net/projects/ibmswtpm2/
BuildRequires: openssl-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%prep
%setup -q -c
+%patch0 -p1
%build
%{__make} -C src \
CC="%{__cc}" \
- CCFLAGS="%{rpmcflags} %{rpmcppflags} -Wall -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Werror -Wsign-compare -Wno-uninitialized -DTPM_POSIX -D_POSIX_ -DTPM_NUVOTON -I. -c" \
+ CCFLAGS="%{rpmcflags} %{rpmcppflags} -Wall -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Werror -Wsign-compare -Wno-uninitialized -Wno-error=deprecated-declarations -DTPM_POSIX -D_POSIX_ -DTPM_NUVOTON -I. -c" \
LNFLAGS="%{rpmldflags} %{rpmcflags} -lcrypto -lpthread -lrt"
%install