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.

pull/129/head
David Garske 2020-12-01 07:45:04 -08:00
parent 4b0b70861c
commit 8087afaf27
6 changed files with 8 additions and 13 deletions

View File

@ -60,7 +60,7 @@
/* force use of a TLS cipher suite */
#if 0
#ifndef TLS_CIPHER_SUITE
#define TLS_CIPHER_SUITE "ECDHE-rsa-AES128-SHA256"
#define TLS_CIPHER_SUITE "ECDHE-RSA-AES128-SHA256"
#endif
#endif

View File

@ -374,7 +374,7 @@ int TPM2_TLS_ServerArgs(void* userCtx, int argc, char *argv[])
#if 0
/* Optionally choose the cipher suite */
rc = wolfSSL_CTX_set_cipher_list(ctx, "ECDHE-rsa-AES128-GCM-SHA256");
rc = wolfSSL_CTX_set_cipher_list(ctx, TLS_CIPHER_SUITE);
if (rc != WOLFSSL_SUCCESS) {
goto exit;
}

View File

@ -2,9 +2,5 @@
# included from Top Level Makefile.am
# All paths should be given relative to the root
if BUILD_SWTPM
check_SCRIPTS += scripts/swtpm_sim.test
dist_noinst_SCRIPTS += scripts/swtpm_sim.test
endif
EXTRA_DIST += scripts/swtpm_sim.test
EXTRA_DIST += scripts/tls_setup.sh

View File

@ -52,11 +52,11 @@
/* This function performs key generation according to Part 1 of the TPM spec
* and returns the number of bytes generated, which may be zero.
*
* 'key' input data is used together with the label, ContextU and ContextV to
* 'keyIn' input data is used together with the label, ContextU and ContextV to
* generate the session key.
*
* 'keyStream' points to the buffer storing the generated session key, and
* 'keyStream' can not be NULL.
* 'key' points to the buffer storing the generated session key, and
* 'key' can not be NULL.
*
* 'sizeInBits' must be no larger than (2^18)-1 = 256K bits (32385 bytes).
*
@ -94,7 +94,7 @@ int TPM2_KDFa(
UINT32 sizeInBits = keySz * 8, pos;
BYTE* keyStream = key;
if (key == NULL || keyStream == NULL)
if (key == NULL)
return BAD_FUNC_ARG;
hashType = TPM2_GetHashType(hashAlg);

View File

@ -3,9 +3,7 @@
# All paths should be given relative to the root
if BUILD_EXAMPLES
if ! BUILD_SWTPM
check_PROGRAMS += tests/unit.test
endif
noinst_PROGRAMS += tests/unit.test
tests_unit_test_SOURCES = \
tests/unit_tests.c \

View File

@ -12,6 +12,7 @@ nobase_include_HEADERS+= \
wolftpm/tpm2_swtpm.h \
wolftpm/tpm2_winapi.h \
wolftpm/tpm2_param_enc.h \
wolftpm/tpm2_socket.h \
wolftpm/version.h \
wolftpm/visibility.h \
wolftpm/options.h