Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes for v3.4.0 release #363

Merged
merged 2 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -291,17 +291,25 @@ if (WOLFTPM_EXAMPLES)
add_tpm_example(make_credential attestation/make_credential.c)
add_tpm_example(bench bench/bench.c)
add_tpm_example(csr csr/csr.c)
add_tpm_example(get_ek_certs endorsement/get_ek_certs.c)
add_tpm_example(ifx_fw_extract firmware/ifx_fw_extract.c)
add_tpm_example(ifx_fw_update firmware/ifx_fw_update.c)
add_tpm_example(gpio_config gpio/gpio_config.c)
add_tpm_example(gpio_read gpio/gpio_read.c)
add_tpm_example(gpio_set gpio/gpio_set.c)
add_tpm_example(create_primary keygen/create_primary.c)
add_tpm_example(external_import keygen/external_import.c)
add_tpm_example(keygen keygen/keygen.c)
add_tpm_example(keyimport keygen/keyimport.c)
add_tpm_example(keyload keygen/keyload.c)
add_tpm_example(flush management/flush.c)
add_tpm_example(native_test native/native_test.c)
add_tpm_example(counter nvram/counter.c)
add_tpm_example(policy_nv nvram/policy_nv.c)
add_tpm_example(read nvram/read.c)
add_tpm_example(store nvram/store.c)
add_tpm_example(extend pcr/extend.c)
add_tpm_example(policy_sign pcr/policy_sign.c)
add_tpm_example(quote pcr/quote.c)
add_tpm_example(read_pcr pcr/read_pcr.c)
add_tpm_example(reset pcr/reset.c)
Expand Down
15 changes: 7 additions & 8 deletions wolftpm/tpm2_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -432,16 +432,15 @@ typedef int64_t INT64;
/* ---------------------------------------------------------------------------*/

/* Optional delay between polling */
#if (defined(WOLFTPM_SLB9670) || defined(WOLFTPM_SLB9672)) && !defined(XTPM_WAIT)
/* For Infineon SLB9670 and SLB9672 adding 10us delay improves performance
#if defined(__linux__) && !defined(XTPM_WAIT)
/* Avoid excessive polling.
* For Infineon SLB9670 and SLB9672 adding 10us delay improves performance
* and prevents issue with rapid use at higher speeds */
#ifdef __linux__
#ifndef XTPM_WAIT_POLLING_US
#define XTPM_WAIT_POLLING_US 10 /* 0.01ms */
#endif
#include <unistd.h>
#define XTPM_WAIT() usleep(XTPM_WAIT_POLLING_US);
#ifndef XTPM_WAIT_POLLING_US
#define XTPM_WAIT_POLLING_US 10 /* 0.01ms */
#endif
#include <unistd.h>
#define XTPM_WAIT() usleep(XTPM_WAIT_POLLING_US);
#endif
#ifndef XTPM_WAIT
#define XTPM_WAIT() /* just poll without delay by default */
Expand Down
2 changes: 1 addition & 1 deletion wolftpm/tpm2_wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -2684,7 +2684,7 @@ WOLFTPM_API int wolfTPM2_GetKeyTemplate_KeySeal(TPMT_PUBLIC* publicTemplate, TPM
\param publicTemplate pointer to an empty structure of TPMT_PUBLIC type, to store the new template
\param alg can be only TPM_ALG_RSA or TPM_ALG_ECC, see Note above
\param keyBits integer value, specifying bits for the key, typically 2048 (RSA) or 256 (ECC)
\param curveId use one of the accepted TPM_ECC_CURVE values like TPM_ECC_NIST_P256 (only used when alg=TPM_ALG_ECC)
\param curveID use one of the accepted TPM_ECC_CURVE values like TPM_ECC_NIST_P256 (only used when alg=TPM_ALG_ECC)
\param nameAlg integer value of TPMI_ALG_HASH type, specifying a valid TPM2 hashing algorithm (typically TPM_ALG_SHA256)
\param highRange integer value: 0=low range, 1=high range

Expand Down
Loading