Skip to content

Commit 8087afa

Browse files
committed
Fixes from peer review. Resolve issue with make check. Removed the TPM Simulator for make check (does not build out of the box on all platforms). Make dist was not including the new tpm2_socket.h.
1 parent 4b0b708 commit 8087afa

6 files changed

Lines changed: 8 additions & 13 deletions

File tree

examples/tls/tls_common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
/* force use of a TLS cipher suite */
6161
#if 0
6262
#ifndef TLS_CIPHER_SUITE
63-
#define TLS_CIPHER_SUITE "ECDHE-rsa-AES128-SHA256"
63+
#define TLS_CIPHER_SUITE "ECDHE-RSA-AES128-SHA256"
6464
#endif
6565
#endif
6666

examples/tls/tls_server.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ int TPM2_TLS_ServerArgs(void* userCtx, int argc, char *argv[])
374374

375375
#if 0
376376
/* Optionally choose the cipher suite */
377-
rc = wolfSSL_CTX_set_cipher_list(ctx, "ECDHE-rsa-AES128-GCM-SHA256");
377+
rc = wolfSSL_CTX_set_cipher_list(ctx, TLS_CIPHER_SUITE);
378378
if (rc != WOLFSSL_SUCCESS) {
379379
goto exit;
380380
}

scripts/include.am

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,5 @@
22
# included from Top Level Makefile.am
33
# All paths should be given relative to the root
44

5-
if BUILD_SWTPM
6-
check_SCRIPTS += scripts/swtpm_sim.test
7-
dist_noinst_SCRIPTS += scripts/swtpm_sim.test
8-
endif
9-
5+
EXTRA_DIST += scripts/swtpm_sim.test
106
EXTRA_DIST += scripts/tls_setup.sh

src/tpm2_param_enc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@
5252
/* This function performs key generation according to Part 1 of the TPM spec
5353
* and returns the number of bytes generated, which may be zero.
5454
*
55-
* 'key' input data is used together with the label, ContextU and ContextV to
55+
* 'keyIn' input data is used together with the label, ContextU and ContextV to
5656
* generate the session key.
5757
*
58-
* 'keyStream' points to the buffer storing the generated session key, and
59-
* 'keyStream' can not be NULL.
58+
* 'key' points to the buffer storing the generated session key, and
59+
* 'key' can not be NULL.
6060
*
6161
* 'sizeInBits' must be no larger than (2^18)-1 = 256K bits (32385 bytes).
6262
*
@@ -94,7 +94,7 @@ int TPM2_KDFa(
9494
UINT32 sizeInBits = keySz * 8, pos;
9595
BYTE* keyStream = key;
9696

97-
if (key == NULL || keyStream == NULL)
97+
if (key == NULL)
9898
return BAD_FUNC_ARG;
9999

100100
hashType = TPM2_GetHashType(hashAlg);

tests/include.am

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
# All paths should be given relative to the root
44

55
if BUILD_EXAMPLES
6-
if ! BUILD_SWTPM
76
check_PROGRAMS += tests/unit.test
8-
endif
97
noinst_PROGRAMS += tests/unit.test
108
tests_unit_test_SOURCES = \
119
tests/unit_tests.c \

wolftpm/include.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ nobase_include_HEADERS+= \
1212
wolftpm/tpm2_swtpm.h \
1313
wolftpm/tpm2_winapi.h \
1414
wolftpm/tpm2_param_enc.h \
15+
wolftpm/tpm2_socket.h \
1516
wolftpm/version.h \
1617
wolftpm/visibility.h \
1718
wolftpm/options.h

0 commit comments

Comments
 (0)