Skip to content

Commit b042e4d

Browse files
committed
Fixes for build and testing with --enable-infineon=9670. Additional build tests.
1 parent 9e29f52 commit b042e4d

File tree

5 files changed

+30
-4
lines changed

5 files changed

+30
-4
lines changed

.github/workflows/make-test-swtpm.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,25 @@ jobs:
5454
wolftpm_config: --enable-swtpm --enable-smallstack
5555
test_command: "make check && WOLFSSL_PATH=./wolfssl ./examples/run_examples.sh"
5656

57+
# Infineon SLB9670
58+
- name: slb9670
59+
wolftpm_config: --enable-infineon=slb9670
60+
# Infineon SLB9672
61+
- name: slb9672
62+
wolftpm_config: --enable-infineon=slb9672
63+
# Infineon SLB9673
64+
- name: slb9673
65+
wolftpm_config: --enable-infineon=slb9673 --enable-i2c
66+
# STMicro ST33KTPM2
67+
- name: st33ktpm2
68+
wolftpm_config: --enable-st33
69+
# Microchip
70+
- name: microchip
71+
wolftpm_config: --enable-microchip
72+
# Nuvoton
73+
- name: nuvoton
74+
wolftpm_config: --enable-nuvoton
75+
5776
# TIS lock
5877
- name: tislock
5978
wolftpm_config: --enable-tislock
@@ -121,7 +140,7 @@ jobs:
121140

122141
# Default configure (no AES CFB, no PKCS7, no crypto cb, no cert gen)
123142
- name: default-configure
124-
wolfssl_config: --enable-wolftpm
143+
wolfssl_config: ""
125144
wolfssl_cflags: "-DWOLFSSL_PUBLIC_MP"
126145
test_command: "make check && WOLFSSL_PATH=./wolfssl WOLFCRYPT_DEFAULT=1 ./examples/run_examples.sh"
127146
needs_install: true
@@ -157,7 +176,7 @@ jobs:
157176
WOLFSSL_CONFIG="${{ matrix.wolfssl_config || '--enable-wolftpm --enable-pkcallbacks' }}"
158177
WOLFSSL_CFLAGS="${{ matrix.wolfssl_cflags || '' }}"
159178
if [ -n "$WOLFSSL_CFLAGS" ]; then
160-
CFLAGS="$WOLFSSL_CFLAGS" ./configure $WOLFSSL_CONFIG
179+
./configure $WOLFSSL_CONFIG CFLAGS="$WOLFSSL_CFLAGS"
161180
else
162181
./configure $WOLFSSL_CONFIG
163182
fi

examples/native/native_test.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,6 +1465,9 @@ int TPM2_Native_TestArgs(void* userCtx, int argc, char *argv[])
14651465
goto exit;
14661466
}
14671467
}
1468+
1469+
printf("Native test passed\n");
1470+
14681471
exit:
14691472

14701473
/* Close session */

examples/tls/tls_client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ int main(int argc, char* argv[])
694694
(void)argc;
695695
(void)argv;
696696

697-
printf("TPM Wrapper or PK//Crypto callback or TLS support not compiled in\n");
697+
printf("TPM Wrapper or PK/Crypto callback or TLS support not compiled in\n");
698698
printf("Build wolfssl with ./configure --enable-wolftpm\n");
699699
#endif
700700

examples/tls/tls_server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ int main(int argc, char* argv[])
742742
(void)argc;
743743
(void)argv;
744744

745-
printf("TPM Wrapper or PK//Crypto callback or TLS support not compiled in\n");
745+
printf("TPM Wrapper or PK/Crypto callback or TLS support not compiled in\n");
746746
printf("Build wolfssl with ./configure --enable-wolftpm\n");
747747
#endif
748748

wolftpm/tpm2_types.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,10 @@ typedef int64_t INT64;
349349
#ifdef WOLFTPM_SLB9670
350350
/* Max: 43MHz */
351351
#define TPM2_SPI_MAX_HZ_INFINEON 43000000
352+
#ifndef MAX_AES_KEY_BITS
353+
#define MAX_AES_KEY_BITS 128
354+
#endif
355+
352356
#elif !defined(WOLFTPM_AUTODETECT)
353357
#ifdef WOLFTPM_I2C
354358
#undef WOLFTPM_SLB9673

0 commit comments

Comments
 (0)