mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@db180c0
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
From 295cd8f7fb8e1a1ad8f64d981e99969a364d941e Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Santos <casantos@datacom.ind.br>
|
||||
Date: Sat, 24 Mar 2018 22:46:46 -0300
|
||||
Subject: [PATCH] tpm2_certify: fix "'type' may be used uninitialized" warning
|
||||
|
||||
get_key_type does not assign a value to 'type' on error conditions,
|
||||
which makes the compiler believe that it will be used uninitialized in
|
||||
the LOG_ERR call, in set_scheme. In practice this will never happen
|
||||
because set_scheme returns immediately if get_key_type retuns false but
|
||||
the compiler does not understand that logic and fails because warnings
|
||||
are treated as errors.
|
||||
|
||||
Adapted for version 3.1.3 from the change submitted upstream:
|
||||
|
||||
https://github.com/tpm2-software/tpm2-tools/pull/954
|
||||
|
||||
Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
|
||||
---
|
||||
tools/tpm2_certify.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/tools/tpm2_certify.c b/tools/tpm2_certify.c
|
||||
index 0575072..e562586 100644
|
||||
--- a/tools/tpm2_certify.c
|
||||
+++ b/tools/tpm2_certify.c
|
||||
@@ -98,6 +98,7 @@ static bool get_key_type(TSS2_SYS_CONTEXT *sapi_context, TPMI_DH_OBJECT object_h
|
||||
&out_public, &name, &qualified_name, &sessions_data_out));
|
||||
if (rval != TPM2_RC_SUCCESS) {
|
||||
LOG_ERR("TPM2_ReadPublic failed. Error Code: 0x%x", rval);
|
||||
+ *type = TPM2_ALG_ERROR;
|
||||
return false;
|
||||
}
|
||||
|
||||
--
|
||||
2.19.1
|
||||
|
||||
22
package/tpm2-tools/Config.in
Normal file
22
package/tpm2-tools/Config.in
Normal file
@@ -0,0 +1,22 @@
|
||||
config BR2_PACKAGE_TPM2_TOOLS
|
||||
bool "tpm2-tools"
|
||||
depends on !BR2_STATIC_LIBS # tpm2-tss
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
select BR2_PACKAGE_TPM2_TSS
|
||||
help
|
||||
TPM (Trusted Platform Module) 2.0 CLI tools based on system
|
||||
API of TPM2-TSS. These tools can be used to manage keys,
|
||||
perform encryption/decryption/signing/etc crypto operations,
|
||||
and manage non-volatile storage through a TPM2.0 HW
|
||||
implementation.
|
||||
|
||||
Notice: An in-kernel resource manager is provided by the
|
||||
Linux kernel since 4.12. Depending on use cases and kernel
|
||||
version, the user space resource manager provided by
|
||||
tpm2-abrmd may be needed.
|
||||
|
||||
https://github.com/tpm2-software/tpm2-tools
|
||||
|
||||
comment "tpm2-tools needs a toolchain w/ dynamic library"
|
||||
depends on BR2_STATIC_LIBS
|
||||
3
package/tpm2-tools/tpm2-tools.hash
Normal file
3
package/tpm2-tools/tpm2-tools.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# Locally computed:
|
||||
sha256 2f515200e9a7958ee13015150f7958c8a332eb071c2564c33f81ebe32c4f6033 tpm2-tools-3.1.4.tar.gz
|
||||
sha256 3d6b149c8b042bd5f3db678d587fbe55230d071ca084bd38dcae451679c6dd45 LICENSE
|
||||
18
package/tpm2-tools/tpm2-tools.mk
Normal file
18
package/tpm2-tools/tpm2-tools.mk
Normal file
@@ -0,0 +1,18 @@
|
||||
################################################################################
|
||||
#
|
||||
# tpm2-tools
|
||||
#
|
||||
################################################################################
|
||||
|
||||
TPM2_TOOLS_VERSION = 3.1.4
|
||||
TPM2_TOOLS_SITE = https://github.com/tpm2-software/tpm2-tools/releases/download/$(TPM2_TOOLS_VERSION)
|
||||
TPM2_TOOLS_LICENSE = BSD-3-Clause
|
||||
TPM2_TOOLS_LICENSE_FILES = LICENSE
|
||||
TPM2_TOOLS_DEPENDENCIES = libcurl openssl tpm2-tss host-pkgconf
|
||||
|
||||
# -fstack-protector-all and FORTIFY_SOURCE=2 is used by
|
||||
# default. Disable that so the BR2_SSP_* / BR2_FORTIFY_SOURCE_* options
|
||||
# in the toolchain wrapper and CFLAGS are used instead
|
||||
TPM2_TOOLS_CONF_OPTS = --disable-hardening
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user