Skip to content

wolfTPM succcessfully built but examples don't work? #457

@OevreFlataeker

Description

@OevreFlataeker

I am a new user of wolfTPM.
I previously built wolfSSL and installed it into prefix /usr/local on my Raspi4 with Debian Bookworm

git clone https://github.com/wolfSSL/wolfssl.git
cd wolfssl
./autogen.sh
./configure --enable-wolftpm
make
sudo make install
sudo ldconfig

I then configured wolfTPM and built it:

./configure --with-wolfcrypt=/usr/local/ --enable-infineon
[...]

Configuration summary for wolftpm version 3.10.0

   * Installation prefix:       /usr/local
   * System type:               unknown-linux-gnu
   * Host CPU:                  aarch64
   * C Compiler:                gcc
   * C Flags:                    -Werror -Wno-pragmas -Wall -Wno-strict-aliasing -Wextra -Wunknown-pragmas --param=ssp-buffer-size=1 -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmaybe-uninitialized -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wnormalized=id -Woverride-init -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv
   * CPP Flags:                  -fvisibility=hidden -I/usr/local//include
   * Linker Flags:               -L/usr/local//lib
   * LIB Flags:                  -pie -z relro -z now -Werror
   * Wrappers:                  yes
   * Examples:                  yes
   * wolfCrypt:                 yes
   * Advanced IO:               no
   * I2C:                       no
   * Linux kernel TPM device:   no
   * SWTPM:                     no
   * WINAPI:                    no
   * TIS/SPI Check Wait State:  no
   * Infineon SLB967X           yes
   * STM ST33:                  no
   * Microchip ATTPM20:         no
   * Nuvoton NPCT75x:           no
   * Runtime Module Detection:  test
   * Firmware Upgrade Support:  yes

The built itself was also successful but none of the examples seem to work?

daubsi@pi4:~/infineon/wolfTPM/examples $ ./keygen/create_primary -rsa -oh
TPM2.0 Primary Key generation example
	Algorithm: RSA
	Store Handle: 0x00000000
	Use Parameter Encryption: NULL

wolfTPM2_Init failed

Failure 0x101: TPM_RC_FAILURE

daubsi@pi4:~/infineon/wolfTPM/examples/wrap $ ./caps
TPM2 Get Capabilities
daubsi@pi4:~/infineon/wolfTPM/examples/wrap $ ./wrap_test
TPM2 Demo for Wrapper API's

What's wrong here?
The native tpm2-tools work as expected. I've stopped the tpm2-abrmd daemon as well before trying to run any examples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions