commit
7383c9ee42
@ -0,0 +1,2 @@
|
|||||||
|
SOURCES/gpgkey-8E1F50C1.gpg
|
||||||
|
SOURCES/tpm2-pkcs11-1.5.0.tar.gz
|
@ -0,0 +1,2 @@
|
|||||||
|
46f82c0fdf30219e0d95c6e9291bbc708b315080 SOURCES/gpgkey-8E1F50C1.gpg
|
||||||
|
9d4ad805203f0f063772f0c737bed949dfff52bd SOURCES/tpm2-pkcs11-1.5.0.tar.gz
|
@ -0,0 +1,100 @@
|
|||||||
|
diff -urN tpm2-pkcs11-1.5.0/src/lib/ssl_util.c tpm2-pkcs11-1.5.0-fix/src/lib/ssl_util.c
|
||||||
|
--- tpm2-pkcs11-1.5.0/src/lib/ssl_util.c 2020-11-03 17:36:45.000000000 -0700
|
||||||
|
+++ tpm2-pkcs11-1.5.0-fix/src/lib/ssl_util.c 2021-05-26 10:17:23.723128758 -0700
|
||||||
|
@@ -438,82 +438,29 @@
|
||||||
|
return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static CK_RV create_ecdsa_sig(CK_BYTE_PTR sig, CK_ULONG siglen, ECDSA_SIG **outsig) {
|
||||||
|
-
|
||||||
|
- if (siglen & 1) {
|
||||||
|
- LOGE("Expected ECDSA signature length to be even, got : %lu",
|
||||||
|
- siglen);
|
||||||
|
- return CKR_SIGNATURE_LEN_RANGE;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- size_t len = siglen >> 1;
|
||||||
|
-
|
||||||
|
- unsigned char *rbuf = sig;
|
||||||
|
- unsigned char *sbuf = &sig[len];
|
||||||
|
-
|
||||||
|
- BIGNUM *r = BN_bin2bn(rbuf, len, NULL);
|
||||||
|
- if (!r) {
|
||||||
|
- LOGE("Could not make bignum for r");
|
||||||
|
- return CKR_GENERAL_ERROR;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- BIGNUM *s = BN_bin2bn(sbuf, len, NULL);
|
||||||
|
- if (!s) {
|
||||||
|
- LOGE("Could not make bignum for s");
|
||||||
|
- BN_free(r);
|
||||||
|
- return CKR_GENERAL_ERROR;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- ECDSA_SIG *ossl_sig = ECDSA_SIG_new();
|
||||||
|
- if (!ossl_sig) {
|
||||||
|
- LOGE("oom");
|
||||||
|
- return CKR_HOST_MEMORY;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- int rc = ECDSA_SIG_set0(ossl_sig, r, s);
|
||||||
|
- if (!rc) {
|
||||||
|
- LOGE("Could not call ECDSA_SIG_set0");
|
||||||
|
- ECDSA_SIG_free(ossl_sig);
|
||||||
|
- return CKR_GENERAL_ERROR;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- *outsig = ossl_sig;
|
||||||
|
-
|
||||||
|
- return CKR_OK;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
static CK_RV do_sig_verify_ec(EVP_PKEY *pkey,
|
||||||
|
CK_BYTE_PTR digest, CK_ULONG digest_len,
|
||||||
|
CK_BYTE_PTR signature, CK_ULONG signature_len) {
|
||||||
|
|
||||||
|
- EC_KEY *eckey = EVP_PKEY_get0_EC_KEY(pkey);
|
||||||
|
- if (!eckey) {
|
||||||
|
- LOGE("Expected EC Key");
|
||||||
|
- return CKR_GENERAL_ERROR;
|
||||||
|
- }
|
||||||
|
+ int rc = CKR_OK;
|
||||||
|
+ EVP_PKEY_CTX *pctx = NULL;
|
||||||
|
|
||||||
|
- /*
|
||||||
|
- * OpenSSL expects ASN1 framed signatures, PKCS11 does flate
|
||||||
|
- * R + S signatures, so convert it to ASN1 framing.
|
||||||
|
- * See:
|
||||||
|
- * https://github.com/tpm2-software/tpm2-pkcs11/issues/277
|
||||||
|
- * For details.
|
||||||
|
- */
|
||||||
|
- ECDSA_SIG *ossl_sig = NULL;
|
||||||
|
- CK_RV rv = create_ecdsa_sig(signature, signature_len, &ossl_sig);
|
||||||
|
- if (rv != CKR_OK) {
|
||||||
|
- return rv;
|
||||||
|
+ if ((pctx = EVP_PKEY_CTX_new(pkey, NULL)) == NULL) {
|
||||||
|
+ rc = CKR_HOST_MEMORY;
|
||||||
|
+ goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
- int rc = ECDSA_do_verify(digest, digest_len, ossl_sig, eckey);
|
||||||
|
- if (rc < 0) {
|
||||||
|
- ECDSA_SIG_free(ossl_sig);
|
||||||
|
- SSL_UTIL_LOGE("ECDSA_do_verify failed");
|
||||||
|
- return CKR_GENERAL_ERROR;
|
||||||
|
+ if (EVP_PKEY_verify_init(pctx) != 1 ||
|
||||||
|
+ EVP_PKEY_verify(pctx, signature, signature_len,
|
||||||
|
+ digest, digest_len) != 1) {
|
||||||
|
+ rc = CKR_SIGNATURE_INVALID;
|
||||||
|
+ goto fail;
|
||||||
|
}
|
||||||
|
- ECDSA_SIG_free(ossl_sig);
|
||||||
|
|
||||||
|
- return rc == 1 ? CKR_OK : CKR_SIGNATURE_INVALID;
|
||||||
|
+fail:
|
||||||
|
+ if (pctx)
|
||||||
|
+ EVP_PKEY_CTX_free(pctx);
|
||||||
|
+ return rc;
|
||||||
|
}
|
||||||
|
|
||||||
|
CK_RV ssl_util_sig_verify(EVP_PKEY *pkey,
|
@ -0,0 +1,16 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
|
||||||
|
iQIzBAABCgAdFiEEW0grjj4Z2nyXjh0BbeLpB44fUMEFAl+ysTkACgkQbeLpB44f
|
||||||
|
UMGhSBAAx2FY2flB6vuetgdKoh4G85Zgq8+xsmjsTRoXT8/4tS8wPL64ESYo89pG
|
||||||
|
mhVr4KBb5tNVwntA73aQ/ko82zPnVSTFW0nHODTICME1NRnAZQpUJ1emZtRQdnxL
|
||||||
|
ByZPNx2ub41zepsorqABxYZlugVX4j9GRK7HpyC3OKxw51Cvua8Ciww1u2uSELlU
|
||||||
|
JjUbhUXJICAYcn31hKYcASHsYB7fio2QrmjGG8ZHiz2Dh1hW1kn5ezsgUKUIMYxQ
|
||||||
|
bFcPmWcZF1N9GD5PB/LxE0V25ZiRxXUCfG0YfYR6fWY2uIfIW4izcgLZJI07KGnM
|
||||||
|
rkW1nnBvzRvKTm6JALHoqnycIyfXJFYY/eJtXT0Yom1HKXEFEc4r9w5lor2pu6HP
|
||||||
|
oE6z0pwLPXpbGhoOQ7m5IY6xfCmYtnMeb6f0qrEayGO4B9nAR4GUr6lagVeFK2Af
|
||||||
|
0cOh2lyu2zo7qvgJxEk3DxYruiO3ivLMxm6h5Bt6UgkS605qNYb3R22hFR8uq3em
|
||||||
|
ospbRcoxOaaIvxkIwqFm45sWNJOtxj25p0uPKEMmKKiBIbXadjSKoPcTFf2ihla3
|
||||||
|
bRdg5zs8Sph4PkiESjR9UebNXvTL1h/ZTsrpM2BjprC9a4Aqyx8K/FTOVWFcXOim
|
||||||
|
L/pa8fqwfI72BdasPtB+J+afP+bFQ+lxnrGHuPLHB4MjfVdvzyQ=
|
||||||
|
=V8As
|
||||||
|
-----END PGP SIGNATURE-----
|
@ -0,0 +1,51 @@
|
|||||||
|
diff --git a/src/lib/slot.c b/src/lib/slot.c
|
||||||
|
index b3c7c82..f0a4f2e 100644
|
||||||
|
--- a/src/lib/slot.c
|
||||||
|
+++ b/src/lib/slot.c
|
||||||
|
@@ -120,7 +120,9 @@ CK_RV slot_get_info (CK_SLOT_ID slot_id, CK_SLOT_INFO *info) {
|
||||||
|
}
|
||||||
|
|
||||||
|
str_padded_copy(info->manufacturerID, token_info.manufacturerID, sizeof(info->manufacturerID));
|
||||||
|
- str_padded_copy(info->slotDescription, token_info.label, sizeof(info->slotDescription));
|
||||||
|
+ size_t to_copy = sizeof (token_info.label);
|
||||||
|
+ to_copy = (to_copy > sizeof (info->slotDescription)) ? sizeof (info->slotDescription) : to_copy;
|
||||||
|
+ str_padded_copy(info->slotDescription, token_info.label, to_copy);
|
||||||
|
|
||||||
|
info->hardwareVersion = token_info.hardwareVersion;
|
||||||
|
info->firmwareVersion = token_info.firmwareVersion;
|
||||||
|
diff --git a/src/lib/tpm.c b/src/lib/tpm.c
|
||||||
|
index 90fb3c3..1bce3ac 100644
|
||||||
|
--- a/src/lib/tpm.c
|
||||||
|
+++ b/src/lib/tpm.c
|
||||||
|
@@ -732,7 +732,9 @@ CK_RV tpm_get_token_info (tpm_ctx *ctx, CK_TOKEN_INFO *info) {
|
||||||
|
unsigned char manufacturerID[sizeof(UINT32)+1] = {0}; // 4 bytes + '\0' as temp storage
|
||||||
|
UINT32 manufacturer = ntohl(tpmProperties[TPM2_PT_MANUFACTURER - TPM2_PT_FIXED].value);
|
||||||
|
memcpy(manufacturerID, (unsigned char*) &manufacturer, sizeof(uint32_t));
|
||||||
|
- str_padded_copy(info->manufacturerID, manufacturerID, sizeof(info->manufacturerID));
|
||||||
|
+ size_t to_copy = sizeof (manufacturerID);
|
||||||
|
+ to_copy = (to_copy > sizeof (info->manufacturerID)) ? sizeof (info->manufacturerID) : to_copy;
|
||||||
|
+ str_padded_copy(info->manufacturerID, manufacturerID, to_copy);
|
||||||
|
|
||||||
|
// Map human readable Manufacturer String, if available,
|
||||||
|
// otherwise 4 byte ID was already padded and will be used.
|
||||||
|
diff --git a/test/unit/test_twist.c b/test/unit/test_twist.c
|
||||||
|
index ec66f69..54ec883 100644
|
||||||
|
--- a/test/unit/test_twist.c
|
||||||
|
+++ b/test/unit/test_twist.c
|
||||||
|
@@ -311,6 +311,8 @@ void test_twistbin_aappend_null_array(void **state) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void test_twistbin_aappend_twist_null(void **state) {
|
||||||
|
+#pragma GCC diagnostic push
|
||||||
|
+#pragma GCC diagnostic ignored "-Wstringop-overflow="
|
||||||
|
(void) state;
|
||||||
|
|
||||||
|
twist expected = twist_new("foo");
|
||||||
|
@@ -322,6 +324,7 @@ void test_twistbin_aappend_twist_null(void **state) {
|
||||||
|
assert_ptr_equal((void * )actual, (void * )expected);
|
||||||
|
|
||||||
|
twist_free(actual);
|
||||||
|
+#pragma GCC diagnostic pop
|
||||||
|
}
|
||||||
|
|
||||||
|
void test_twistbin_create_null(void **state) {
|
@ -0,0 +1,86 @@
|
|||||||
|
From 78f4e2b47d02cb8215f252e77c68a81dfe4afa30 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?SZ=20Lin=20=28=E6=9E=97=E4=B8=8A=E6=99=BA=29?=
|
||||||
|
<szlin@debian.org>
|
||||||
|
Date: Fri, 22 Jan 2021 14:38:03 +0800
|
||||||
|
Subject: [PATCH] Fix endian issue on s390x platform
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
7 tests from test_db.c used an int type for sqlite3_last_insert_rowid,
|
||||||
|
which caused endian issue and test failed on s390 platform
|
||||||
|
|
||||||
|
Signed-off-by: SZ Lin (林上智) <szlin@debian.org>
|
||||||
|
Link: https://buildd.debian.org/status/fetch.php?pkg=tpm2-pkcs11&arch=s390x&ver=1.5.0-3&stamp=1611234144&raw=0
|
||||||
|
---
|
||||||
|
test/unit/test_db.c | 14 +++++++-------
|
||||||
|
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/test/unit/test_db.c b/test/unit/test_db.c
|
||||||
|
index 7f11a487..d490d02f 100644
|
||||||
|
--- a/test/unit/test_db.c
|
||||||
|
+++ b/test/unit/test_db.c
|
||||||
|
@@ -2503,7 +2503,7 @@ static void test_db_add_token_sqlite3_finalize_fail(void **state) {
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_bind_text */
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_bind_text */
|
||||||
|
{ .rc = SQLITE_DONE }, /* sqlite3_step */
|
||||||
|
- { .rc = 42 }, /* sqlite3_last_insert_rowid*/
|
||||||
|
+ { .u64 = 42 }, /* sqlite3_last_insert_rowid*/
|
||||||
|
{ .rc = SQLITE_ERROR }, /* sqlite3_finalize */
|
||||||
|
{ .rc = SQLITE_OK }, /* TRANSACTION_END */
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_finalize */
|
||||||
|
@@ -2544,7 +2544,7 @@ static void test_db_add_token_sqlite3_prepare_v2_2_fail(void **state) {
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_bind_text */
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_bind_text */
|
||||||
|
{ .rc = SQLITE_DONE }, /* sqlite3_step */
|
||||||
|
- { .rc = 42 }, /* sqlite3_last_insert_rowid*/
|
||||||
|
+ { .u64 = 42 }, /* sqlite3_last_insert_rowid*/
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_finalize */
|
||||||
|
{ .rc = SQLITE_ERROR }, /* sqlite3_prepare_v2 */
|
||||||
|
{ .rc = SQLITE_OK }, /* TRANSACTION_END */
|
||||||
|
@@ -2586,7 +2586,7 @@ static void test_db_add_token_sqlite3_bind_int_2_fail(void **state) {
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_bind_text */
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_bind_text */
|
||||||
|
{ .rc = SQLITE_DONE }, /* sqlite3_step */
|
||||||
|
- { .rc = 42 }, /* sqlite3_last_insert_rowid*/
|
||||||
|
+ { .u64 = 42 }, /* sqlite3_last_insert_rowid*/
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_finalize */
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_prepare_v2 */
|
||||||
|
{ .rc = SQLITE_ERROR }, /* sqlite3_bind_int */
|
||||||
|
@@ -2631,7 +2631,7 @@ static void test_db_add_token_sqlite3_bind_text_3_fail(void **state) {
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_bind_text */
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_bind_text */
|
||||||
|
{ .rc = SQLITE_DONE }, /* sqlite3_step */
|
||||||
|
- { .rc = 42 }, /* sqlite3_last_insert_rowid*/
|
||||||
|
+ { .u64 = 42 }, /* sqlite3_last_insert_rowid*/
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_finalize */
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_prepare_v2 */
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_bind_int */
|
||||||
|
@@ -2687,7 +2687,7 @@ static void test_db_add_token_sqlite3_bind_blob_1_fail(void **state) {
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_bind_text */
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_bind_text */
|
||||||
|
{ .rc = SQLITE_DONE }, /* sqlite3_step */
|
||||||
|
- { .rc = 42 }, /* sqlite3_last_insert_rowid*/
|
||||||
|
+ { .u64 = 42 }, /* sqlite3_last_insert_rowid*/
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_finalize */
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_prepare_v2 */
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_bind_int */
|
||||||
|
@@ -2746,7 +2746,7 @@ static void test_db_add_token_sqlite3_bind_blob_2_fail(void **state) {
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_bind_text */
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_bind_text */
|
||||||
|
{ .rc = SQLITE_DONE }, /* sqlite3_step */
|
||||||
|
- { .rc = 42 }, /* sqlite3_last_insert_rowid*/
|
||||||
|
+ { .u64 = 42 }, /* sqlite3_last_insert_rowid*/
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_finalize */
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_prepare_v2 */
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_bind_int */
|
||||||
|
@@ -2807,7 +2807,7 @@ static void test_db_add_token_sqlite3_step_2_fail(void **state) {
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_bind_text */
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_bind_text */
|
||||||
|
{ .rc = SQLITE_DONE }, /* sqlite3_step */
|
||||||
|
- { .rc = 42 }, /* sqlite3_last_insert_rowid*/
|
||||||
|
+ { .u64 = 42 }, /* sqlite3_last_insert_rowid*/
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_finalize */
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_prepare_v2 */
|
||||||
|
{ .rc = SQLITE_OK }, /* sqlite3_bind_int */
|
||||||
|
|
@ -0,0 +1,210 @@
|
|||||||
|
%ifarch s390x
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1861276 -> Disable LTO for now
|
||||||
|
%define _lto_cflags %{nil}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
#global candidate RC0
|
||||||
|
|
||||||
|
Name: tpm2-pkcs11
|
||||||
|
Version: 1.5.0
|
||||||
|
Release: 9%{?candidate:.%{candidate}}%{?dist}
|
||||||
|
Summary: PKCS#11 interface for TPM 2.0 hardware
|
||||||
|
|
||||||
|
License: BSD
|
||||||
|
URL: https://github.com/tpm2-software/tpm2-pkcs11
|
||||||
|
Source0: https://github.com/tpm2-software/%{name}/releases/download/%{version}%{?candidate:-%{candidate}}/%{name}-%{version}%{?candidate:-%{candidate}}.tar.gz
|
||||||
|
Source1: https://github.com/tpm2-software/%{name}/releases/download/%{version}%{?candidate:-%{candidate}}/%{name}-%{version}%{?candidate:-%{candidate}}.tar.gz.asc
|
||||||
|
# William Roberts (Bill Roberts) key from pgp.mit.edu
|
||||||
|
Source2: gpgkey-8E1F50C1.gpg
|
||||||
|
Patch0: tpm2-pkcs11-gcc11.patch
|
||||||
|
# https://github.com/tpm2-software/tpm2-pkcs11/commit/78f4e2b47d02cb8215f252e77c68a81dfe4afa30
|
||||||
|
Patch1: tpm2-pkcs11-s390x.patch
|
||||||
|
Patch2: tpm2-pkcs11-1.5.0-openssl3.patch
|
||||||
|
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: make
|
||||||
|
BuildRequires: python3
|
||||||
|
BuildRequires: libgcrypt-devel
|
||||||
|
BuildRequires: libyaml-devel
|
||||||
|
BuildRequires: openssl-devel
|
||||||
|
BuildRequires: p11-kit-devel
|
||||||
|
BuildRequires: sqlite-devel
|
||||||
|
BuildRequires: tpm2-tools
|
||||||
|
BuildRequires: tpm2-tss-devel
|
||||||
|
# for tests
|
||||||
|
BuildRequires: libcmocka-devel
|
||||||
|
BuildRequires: dbus-daemon
|
||||||
|
# for tools
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
BuildRequires: python3-pyasn1-modules
|
||||||
|
BuildRequires: python3-pyyaml
|
||||||
|
BuildRequires: python3-cryptography
|
||||||
|
# for tarball signature verification
|
||||||
|
BuildRequires: gnupg2
|
||||||
|
|
||||||
|
%description
|
||||||
|
PKCS #11 is a Public-Key Cryptography Standard that defines a standard method
|
||||||
|
to access cryptographic services from tokens/ devices such as hardware security
|
||||||
|
modules (HSM), smart cards, etc. In this project we intend to use a TPM2 device
|
||||||
|
as the cryptographic token.
|
||||||
|
|
||||||
|
%package tools
|
||||||
|
Summary: The tools required to setup and configure TPM2 for PKCS#11
|
||||||
|
# Automatic generator does not work for me even though the requires.txt is in place
|
||||||
|
Requires: python3-cryptography
|
||||||
|
Requires: python3-pyyaml
|
||||||
|
Requires: python3-pyasn1-modules
|
||||||
|
|
||||||
|
%description tools
|
||||||
|
The tools required to setup and configure TPM2 for PKCS#11.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
|
||||||
|
%autosetup -p1 -n %{name}-%{version}%{?candidate:-%{candidate}}
|
||||||
|
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure --enable-unit CFLAGS="%{optflags} -Wno-error=deprecated-declarations"
|
||||||
|
%{make_build}
|
||||||
|
cd tools
|
||||||
|
%py3_build
|
||||||
|
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/tpm2-pkcs11.pc
|
||||||
|
[ -f $RPM_BUILD_ROOT%{_libdir}/pkcs11/libtpm2_pkcs11.la ] && \
|
||||||
|
rm $RPM_BUILD_ROOT%{_libdir}/pkcs11/libtpm2_pkcs11.la
|
||||||
|
[ -f $RPM_BUILD_ROOT%{_libdir}/pkcs11/libtpm2_pkcs11.a ] && \
|
||||||
|
rm $RPM_BUILD_ROOT%{_libdir}/pkcs11/libtpm2_pkcs11.a
|
||||||
|
cd tools
|
||||||
|
%py3_install
|
||||||
|
install -Dpm 755 tpm2_ptool $RPM_BUILD_ROOT%{_bindir}/tpm2_ptool
|
||||||
|
|
||||||
|
|
||||||
|
%check
|
||||||
|
make check
|
||||||
|
cd tools
|
||||||
|
%{__python3} setup.py test
|
||||||
|
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license LICENSE
|
||||||
|
%{_datadir}/p11-kit/modules/tpm2_pkcs11.module
|
||||||
|
%%dir %{_libdir}/pkcs11
|
||||||
|
%{_libdir}/pkcs11/libtpm2_pkcs11.so
|
||||||
|
%{_libdir}/pkcs11/libtpm2_pkcs11.so.0*
|
||||||
|
|
||||||
|
%files tools
|
||||||
|
%{_bindir}/tpm2_ptool
|
||||||
|
%{python3_sitelib}/tpm2_pkcs11/*
|
||||||
|
%{python3_sitelib}/tpm2_pkcs11_tools-*/*
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Mar 15 2023 MSVSphere Packaging Team <packager@msvsphere.ru> - 1.5.0-9
|
||||||
|
- Rebuilt for MSVSphere 9.1.
|
||||||
|
|
||||||
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.5.0-9
|
||||||
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||||
|
Related: rhbz#1991688
|
||||||
|
|
||||||
|
* Fri Jul 02 2021 Jerry Snitselaar <jsnitsel@redhat.com> - 1.5.0-8
|
||||||
|
- Fix product version for gating
|
||||||
|
Resolves: rhbz#1972907
|
||||||
|
|
||||||
|
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.5.0-7
|
||||||
|
- Rebuilt for RHEL 9 BETA for openssl 3.0
|
||||||
|
Related: rhbz#1971065
|
||||||
|
|
||||||
|
* Wed May 19 2021 Jerry Snitselaar <jsnitsel@redhat.com> - 1.5.0-6
|
||||||
|
- Work around for openssl 3.0 update. Related: rhbz#1958030
|
||||||
|
|
||||||
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.5.0-5
|
||||||
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||||
|
|
||||||
|
* Mon Feb 01 2021 Jakub Jelen <jjelen@redhat.com> - 1.5.0-4}
|
||||||
|
- Unbreak the build on s390x (#1923383)
|
||||||
|
|
||||||
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.5.0-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Dec 07 2020 Jeff Law <law@redhat.com> - 1.5.0-2
|
||||||
|
- Avoid stringop-overflow diagnostic in testsuite
|
||||||
|
|
||||||
|
* Wed Nov 18 2020 Jakub Jelen <jjelen@redhat.com> - 1.5.0-1
|
||||||
|
- New upstream release
|
||||||
|
|
||||||
|
* Tue Sep 15 2020 Jeff Law <law@redhat.com> - 1.4.0-2
|
||||||
|
- Fix two source over-reads detected by gcc-11
|
||||||
|
|
||||||
|
* Mon Aug 24 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.4.0-1
|
||||||
|
- Update to 1.4.0
|
||||||
|
|
||||||
|
* Mon Aug 10 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.3.2-1
|
||||||
|
- Update to 1.3.2
|
||||||
|
|
||||||
|
* Mon Jul 27 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.3.1-1
|
||||||
|
- Update to 1.3.1
|
||||||
|
|
||||||
|
* Tue Jul 07 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.3.0-1
|
||||||
|
- Update to 1.3.0
|
||||||
|
|
||||||
|
* Thu Jul 02 2020 Jakub Jelen <jjelen@redhat.com> - 1.3.0-0.1-RC0
|
||||||
|
- Update to 1.3.0-RC0
|
||||||
|
|
||||||
|
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.2.0-2
|
||||||
|
- Rebuilt for Python 3.9
|
||||||
|
|
||||||
|
* Mon Mar 30 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.2.0-1
|
||||||
|
- Update to 1.2.0
|
||||||
|
|
||||||
|
* Mon Mar 09 2020 Peter Robinson <pbrobinson@fedoraproject.org> - 1.1.0-1
|
||||||
|
- Update to 1.1.0
|
||||||
|
|
||||||
|
* Mon Mar 2 2020 Peter Robinson <pbrobinson@fedoraproject.org> 1.1.0-0.1-RC1
|
||||||
|
- Update to 1.1.0 RC1 candidate
|
||||||
|
|
||||||
|
* Mon Feb 10 2020 Jakub Jelen <jjelen@redhat.com> - 1.0.1-3
|
||||||
|
- Unbreak build with gcc10 (#1796383)
|
||||||
|
|
||||||
|
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jan 07 2020 Jakub Jelen <jjelen@redhat.com> - 1.0.1-1
|
||||||
|
- New upstream release (#1784580)
|
||||||
|
|
||||||
|
* Tue Dec 31 2019 Peter Robinson <pbrobinson@fedoraproject.org> 1.0-1
|
||||||
|
- Update to 1.0 stable release
|
||||||
|
|
||||||
|
* Thu Dec 26 2019 Peter Robinson <pbrobinson@fedoraproject.org> 1.0-0.1-RC1
|
||||||
|
- Update to 1.0 RC1 candidate
|
||||||
|
|
||||||
|
* Fri Oct 11 2019 Jakub Jelen <jjelen@redhat.com> - 0-0.3.20191011git0b7ceff
|
||||||
|
- Update to current git version
|
||||||
|
- Fix missing requires (#1757179)
|
||||||
|
|
||||||
|
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0-0.7.20190813git2f3058c
|
||||||
|
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||||
|
|
||||||
|
* Wed Aug 21 2019 Miro Hrončok <mhroncok@redhat.com> - 0-0.6.20190813git2f3058c
|
||||||
|
- Rebuilt for Python 3.8
|
||||||
|
|
||||||
|
* Tue Aug 20 2019 Peter Robinson <pbrobinson@fedoraproject.org> 0-0.5.20190813git2f3058c
|
||||||
|
- Update to new git snapshot for better use of tss2-tools 4.0 features
|
||||||
|
|
||||||
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 0-0.4.20190219git1e84553
|
||||||
|
- Rebuilt for Python 3.8
|
||||||
|
|
||||||
|
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0-0.3.20190219git1e84553
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Apr 23 2019 Jakub Jelen <jjelen@redhat.com> - 0-0.2.20190219git1e84553
|
||||||
|
- Package missing python tool for TPM2 initialization
|
||||||
|
- Update to current version from github
|
||||||
|
|
||||||
|
* Tue Feb 19 2019 Jakub Jelen <jjelen@redhat.com> - 0-0.1.20190219git836d715
|
||||||
|
- Initial release for Fedora
|
||||||
|
|
||||||
|
|
Loading…
Reference in new issue