Compare commits

..

No commits in common. "rawhide" and "f34" have entirely different histories.
rawhide ... f34

3 changed files with 59 additions and 29 deletions

View File

@ -1,2 +1,2 @@
SHA512 (tpm2-pkcs11-1.7.0.tar.gz) = eb2736a7ef00fefa91bb70cc96d94d1c7b6ce3701ab12301658b7b076d8fca93bc590c7cdba5a84934b6bd09dad252b13670804c686e76a65b03c7ef6d96427d
SHA512 (tpm2-pkcs11-1.7.0.tar.gz.asc) = ee02dcbfe32d905be921f0a1629ec46108ab7af120ddb8c3bdc5aaedc3e8cb9b6c9f69add9af6b3af6e0a916f18c38907fd43916448048741531842f2438c319
SHA512 (tpm2-pkcs11-1.6.0.tar.gz) = db94b2194837564fa330ac7cc15a5185258d5d632f033a60fa82a2b3246e046dac29b6dfece19b4e075383e999ac157286c7f18f6c5ab6a98dd01c8e810065ea
SHA512 (tpm2-pkcs11-1.6.0.tar.gz.asc) = c341080aa6294927f3e97798218fde811525fe30ba79e134a497e989aff5b414fcecc0d24b4aa2a810ffc30901cf8f7129a10c520eb8687e8d5a09f6c4e54e66

51
tpm2-pkcs11-gcc11.patch Normal file
View File

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

View File

@ -6,8 +6,8 @@
#global candidate RC0
Name: tpm2-pkcs11
Version: 1.7.0
Release: 4%{?candidate:.%{candidate}}%{?dist}
Version: 1.6.0
Release: 1%{?candidate:.%{candidate}}%{?dist}
Summary: PKCS#11 interface for TPM 2.0 hardware
License: BSD
@ -16,6 +16,7 @@ Source0: https://github.com/tpm2-software/%{name}/releases/download/%{version}%{
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
BuildRequires: gcc
BuildRequires: make
@ -27,16 +28,15 @@ 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 tests
BuildRequires: libcmocka-devel
BuildRequires: dbus-daemon
BuildRequires: python3-bcrypt
# for tarball signature verification
BuildRequires: gnupg2
@ -100,27 +100,6 @@ cd tools
%changelog
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 1.7.0-3
- Rebuilt for Python 3.11
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Sep 27 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 1.7.0-1
- Update to 1.7.0
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 1.6.0-4
- Rebuilt with OpenSSL 3.0.0
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.6.0-2
- Rebuilt for Python 3.10
* Tue May 25 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 1.6.0-1
- Update to 1.6.0