Updated to version 0.5.2
- coverity fixes - fixes for ARM64 using __aarch64__
This commit is contained in:
parent
0474de21d1
commit
a52948078a
110
0001-Fix-public-header-files-for-c.patch
Normal file
110
0001-Fix-public-header-files-for-c.patch
Normal file
@ -0,0 +1,110 @@
|
||||
From e04b1231ecde605f1fcd2f8ee3b27052b86a17c9 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Berger <stefanb@linux.vnet.ibm.com>
|
||||
Date: Mon, 14 Jul 2014 17:22:14 -0400
|
||||
Subject: [PATCH 1/2] Fix public header files for c++
|
||||
|
||||
Fix the public header files for c++ usage.
|
||||
---
|
||||
include/libtpms/tpm_library.h.in | 7 +++++++
|
||||
include/libtpms/tpm_memory.h | 9 +++++++++
|
||||
include/libtpms/tpm_tis.h | 7 +++++++
|
||||
include/libtpms/tpm_types.h | 8 ++++++++
|
||||
4 files changed, 31 insertions(+)
|
||||
|
||||
diff --git a/include/libtpms/tpm_library.h.in b/include/libtpms/tpm_library.h.in
|
||||
index 3e5ddba..17a0003 100644
|
||||
--- a/include/libtpms/tpm_library.h.in
|
||||
+++ b/include/libtpms/tpm_library.h.in
|
||||
@@ -44,6 +44,10 @@
|
||||
|
||||
#include "tpm_types.h"
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+
|
||||
#define TPM_LIBRARY_VER_MAJOR @LIBTPMS_VER_MAJOR@
|
||||
#define TPM_LIBRARY_VER_MINOR @LIBTPMS_VER_MINOR@
|
||||
#define TPM_LIBRARY_VER_MICRO @LIBTPMS_VER_MICRO@
|
||||
@@ -124,5 +128,8 @@ enum TPMLIB_BlobType {
|
||||
TPM_RESULT TPMLIB_DecodeBlob(const char *data, enum TPMLIB_BlobType type,
|
||||
unsigned char **result, size_t *result_len);
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
|
||||
#endif /* TPM_LIBRARY_H */
|
||||
diff --git a/include/libtpms/tpm_memory.h b/include/libtpms/tpm_memory.h
|
||||
index 9317ef6..69d60b4 100644
|
||||
--- a/include/libtpms/tpm_memory.h
|
||||
+++ b/include/libtpms/tpm_memory.h
|
||||
@@ -42,8 +42,17 @@
|
||||
|
||||
#include "tpm_types.h"
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+
|
||||
TPM_RESULT TPM_Malloc(unsigned char **buffer, uint32_t size);
|
||||
TPM_RESULT TPM_Realloc(unsigned char **buffer, uint32_t size);
|
||||
void TPM_Free(unsigned char *buffer);
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
#endif
|
||||
diff --git a/include/libtpms/tpm_tis.h b/include/libtpms/tpm_tis.h
|
||||
index 6d4cf31..2ff30a4 100644
|
||||
--- a/include/libtpms/tpm_tis.h
|
||||
+++ b/include/libtpms/tpm_tis.h
|
||||
@@ -42,6 +42,10 @@
|
||||
|
||||
#include "tpm_types.h"
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+
|
||||
TPM_RESULT TPM_IO_Hash_Start(void);
|
||||
TPM_RESULT TPM_IO_Hash_Data(const unsigned char *data,
|
||||
uint32_t data_length);
|
||||
@@ -49,5 +53,8 @@ TPM_RESULT TPM_IO_Hash_End(void);
|
||||
|
||||
TPM_RESULT TPM_IO_TpmEstablished_Get(TPM_BOOL *tpmEstablished);
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
|
||||
#endif
|
||||
diff --git a/include/libtpms/tpm_types.h b/include/libtpms/tpm_types.h
|
||||
index ecb109c..6dea326 100644
|
||||
--- a/include/libtpms/tpm_types.h
|
||||
+++ b/include/libtpms/tpm_types.h
|
||||
@@ -46,6 +46,10 @@
|
||||
#include <netinet/in.h> /* for byte order conversions */
|
||||
#endif
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+
|
||||
/* 2.2.1 Basic data types rev 87 */
|
||||
typedef unsigned char BYTE; /* Basic byte used to transmit all character fields. */
|
||||
typedef unsigned char TPM_BOOL; /* TRUE/FALSE field. TRUE = 0x01, FALSE = 0x00 Use TPM_BOOL
|
||||
@@ -135,4 +139,8 @@ typedef uint16_t TPM_TAG; /* The command and response tags */
|
||||
typedef unsigned char * TPM_SYMMETRIC_KEY_TOKEN; /* abstract symmetric key token */
|
||||
typedef unsigned char * TPM_BIGNUM; /* abstract bignum */
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#endif
|
||||
--
|
||||
1.8.1.4
|
||||
|
48
0002-Some-fixes-to-the-spm-spec.patch
Normal file
48
0002-Some-fixes-to-the-spm-spec.patch
Normal file
@ -0,0 +1,48 @@
|
||||
From 327c8be0afb89397d352bde2be26527d2dfc4461 Mon Sep 17 00:00:00 2001
|
||||
From: Stefan Berger <stefanb@linux.vnet.ibm.com>
|
||||
Date: Mon, 14 Jul 2014 17:22:14 -0400
|
||||
Subject: [PATCH 2/2] Some fixes to the spm spec
|
||||
|
||||
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
|
||||
---
|
||||
dist/libtpms.spec.in | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dist/libtpms.spec.in b/dist/libtpms.spec.in
|
||||
index 38dd09d..3eaf06e 100644
|
||||
--- a/dist/libtpms.spec.in
|
||||
+++ b/dist/libtpms.spec.in
|
||||
@@ -81,9 +81,11 @@ Libtpms header files and documentation.
|
||||
--prefix=/usr \
|
||||
--libdir=%{_libdir} \
|
||||
%{?_with_openssl} \
|
||||
- %{?_enable_debug}
|
||||
+ %{?_enable_debug}
|
||||
|
||||
make %{?_smp_mflags}
|
||||
+
|
||||
+%check
|
||||
make check
|
||||
|
||||
%install
|
||||
@@ -134,7 +136,7 @@ make %{?_smp_mflags} install DESTDIR=${RPM_BUILD_ROOT}
|
||||
* Wed Nov 2 2011 Stefan Berger - 0.5.1-11
|
||||
- added (lib)gmp as runtime dependency
|
||||
|
||||
-* Tue Oct 8 2011 Stefan Berger - 0.5.1-10
|
||||
+* Sat Oct 8 2011 Stefan Berger - 0.5.1-10
|
||||
- internal fixes; callback fixes
|
||||
|
||||
* Tue Aug 30 2011 Stefan Berger - 0.5.1-9
|
||||
@@ -185,7 +187,7 @@ make %{?_smp_mflags} install DESTDIR=${RPM_BUILD_ROOT}
|
||||
* Fri Jan 14 2011 Stefan Berger - 0.5.0-1
|
||||
- Changes following Fedora review comments
|
||||
|
||||
-* Tue Dec 02 2010 Stefan Berger
|
||||
+* Thu Dec 2 2010 Stefan Berger
|
||||
- Small tweaks after reading the FedoreCore packaging requirements
|
||||
|
||||
* Tue Nov 16 2010 Stefan Berger
|
||||
--
|
||||
1.8.1.4
|
||||
|
15
libtpms.spec
15
libtpms.spec
@ -19,12 +19,18 @@ Group: Development/Libraries
|
||||
Url: http://sourceforge.net/projects/ibmswtpm
|
||||
Source: http://bergerstefan.users.sourceforge.net/libtpms/%{name}-%{version}.tar.gz
|
||||
|
||||
# Patches since 0.5.2
|
||||
Patch0001: 0001-Fix-public-header-files-for-c.patch
|
||||
Patch0002: 0002-Some-fixes-to-the-spm-spec.patch
|
||||
|
||||
%if %{crypto_subsystem} == openssl
|
||||
BuildRequires: openssl-devel
|
||||
%else
|
||||
BuildRequires: nss-devel >= 3.12.9-2
|
||||
BuildRequires: nss-softokn-freebl-devel >= 3.12.9-2
|
||||
%if 0%{?rhel} > 6
|
||||
BuildRequires: nss-softokn-freebl-static >= 3.12.9-2
|
||||
%endif
|
||||
BuildRequires: nss-softokn-devel >= 3.12.9-2, gmp-devel
|
||||
BuildRequires: pkgconfig gawk
|
||||
BuildRequires: automake autoconf libtool bash coreutils
|
||||
@ -63,6 +69,9 @@ Libtpms header files and documentation.
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%patch0001 -p1
|
||||
%patch0002 -p2
|
||||
|
||||
%build
|
||||
|
||||
%if %{crypto_subsystem} == openssl
|
||||
@ -82,6 +91,8 @@ Libtpms header files and documentation.
|
||||
%{?_enable_debug}
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
make check
|
||||
|
||||
%install
|
||||
@ -132,7 +143,7 @@ make %{?_smp_mflags} install DESTDIR=${RPM_BUILD_ROOT}
|
||||
* Wed Nov 2 2011 Stefan Berger - 0.5.1-11
|
||||
- added (lib)gmp as runtime dependency
|
||||
|
||||
* Tue Oct 8 2011 Stefan Berger - 0.5.1-10
|
||||
* Sat Oct 8 2011 Stefan Berger - 0.5.1-10
|
||||
- internal fixes; callback fixes
|
||||
|
||||
* Tue Aug 30 2011 Stefan Berger - 0.5.1-9
|
||||
@ -183,7 +194,7 @@ make %{?_smp_mflags} install DESTDIR=${RPM_BUILD_ROOT}
|
||||
* Fri Jan 14 2011 Stefan Berger - 0.5.0-1
|
||||
- Changes following Fedora review comments
|
||||
|
||||
* Tue Dec 02 2010 Stefan Berger
|
||||
* Thu Dec 2 2010 Stefan Berger
|
||||
- Small tweaks after reading the FedoreCore packaging requirements
|
||||
|
||||
* Tue Nov 16 2010 Stefan Berger
|
||||
|
Loading…
Reference in New Issue
Block a user