Skip to content

Commit

Permalink
Merge pull request #363 from dgarske/rel_v3.4.0_append
Browse files Browse the repository at this point in the history
Various fixes for v3.4.0 release
  • Loading branch information
bandi13 authored Jul 30, 2024
2 parents 642beec + a441646 commit 724ff37
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 26 deletions.
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
20 changes: 10 additions & 10 deletions docs/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,14 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = ./docs/README.md ./wolftpm/tpm2.h ./wolftpm/tpm2_wrap.h ./hal/tpm_io.h
INPUT = ./docs/README.md \
./examples/README.md \
./examples/pcr/README.md \
./examples/attestation/README.md \
./examples/boot/README.md \
./wolftpm/tpm2.h \
./wolftpm/tpm2_wrap.h \
./hal/tpm_io.h

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down Expand Up @@ -954,7 +961,7 @@ RECURSIVE = NO
# Note that relative paths are relative to the directory from which doxygen is
# run.

EXCLUDE = ./examples
EXCLUDE =

# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
# directories that are symbolic links (a Unix file system feature) are excluded
Expand Down Expand Up @@ -1162,13 +1169,6 @@ VERBATIM_HEADERS = YES

ALPHABETICAL_INDEX = YES

# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
# which the alphabetical index list will be split.
# Minimum value: 1, maximum value: 20, default value: 5.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.

COLS_IN_ALPHA_INDEX = 5

# In case all classes in a project start with a common prefix, all classes will
# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
# can be used to specify a prefix (or a list of prefixes) that should be ignored
Expand Down Expand Up @@ -2065,7 +2065,7 @@ MAN_LINKS = NO
# captures the structure of the code including all documentation.
# The default value is: NO.

GENERATE_XML = NO
GENERATE_XML = YES

# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
Expand Down
12 changes: 6 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ cd wolftpm
make
```

For detailed build instructions see [/README.md](/README.md#building).
For detailed build instructions see [README.md](/README.md#building).

## Getting Started

Expand All @@ -73,17 +73,17 @@ To interface with the hardware platform that is running these applications, plea

### Examples

See [/examples/README.md](/examples/README.md)
See [examples/README.md](/examples/README.md)

### Benchmarks

See [/README.md](/README.md#tpm2-benchmarks)
See [README.md](/README.md#tpm2-benchmarks)

## wolfTPM Library Design

### Library Headers

wolfTPM header files are located in [/wolftpm](/wolftpm).
wolfTPM header files are located in [wolftpm](/wolftpm).

The general header files that should be included from wolfTPM is shown below:

Expand All @@ -104,11 +104,11 @@ See [https://www.wolfssl.com/docs/wolftpm-manual/](https://www.wolfssl.com/docs/

### TPM 2.0 TCG API's

See [/wolftpm/tpm2.h](/wolftpm/tpm2.h) for inline doxygen style API documentation.
See [wolftpm/tpm2.h](/wolftpm/tpm2.h) for inline doxygen style API documentation.

### wolfTPM Wrapper API's

See [/wolftpm/tpm2_wrap.h](/wolftpm/tpm2_wrap.h) for inline doxygen style API documentation.
See [wolftpm/tpm2_wrap.h](/wolftpm/tpm2_wrap.h) for inline doxygen style API documentation.

## Support

Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This example demonstrates the use of `authSession` (authorization Session) and `

Demonstrates the generation of TPM2.0 Quote used for attestation of the system state by putting PCR value(s) in a TPM signed structure.

More information about how to test and use PCR attestation can be found in the in [examples/pcr/README.md](./examples/pcr/README.md).
More information about how to test and use PCR attestation can be found in the in [examples/pcr/README.md](/examples/pcr/README.md).

`./examples/pcr/quote`
`./examples/pcr/extend`
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

0 comments on commit 724ff37

Please sign in to comment.