aboutsummaryrefslogtreecommitdiff
path: root/Makefile-test.am
AgeCommit message (Collapse)Author
2019-03-15Tests: esys+sys encrypt / decrypt session flags propagationAndreas Fuchs
Adding a test for command decrypt and response encrypt session flags that are set in Esys are actually propagated to the TPM command's session flags, if the command allows this. Using TPM2_CreatePrimary as a candidate. Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2019-03-01test: don't build tcti_default unit test when fuzzing in enabledTadeusz Struk
Don't build tcti_default unit test when fuzzing in enabled. Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
2019-02-25test: add tests that covers auto unset session enc/dec flagsTadeusz Struk
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
2019-01-14build: remove superfluous remnants of uriparserJonas Witschel
uriparser was completely removed in e394cffe3add7874299b9571e0b5140b4dc51dfe. Signed-off-by: Jonas Witschel <diabonas@gmx.de>
2018-11-14 ESYS TEST: Split the test policy-regression-opt into three test cases.Juergen Repp
* The original test did check optional policy commands. Since it cannot be expected that the three optional commands are all implemented on a physical TPM the test case was split. * If the related command is not implemented only this test case will be skipped. * Also the related doxygen files are updated. Signed-off-by: Juergen Repp <Juergen.Repp@sit.fraunhofer.de>
2018-11-12build: Use SPDX license identifier in autoconf & automake files.Philip Tricca
Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
2018-09-30Build: Fix autotools warning on _LDFLAGSAndreas Fuchs
autotools does not like variables to end on _LDFLAGS and spits out warnings. So we rename the variable. Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-09-30test: Add integration test for StirRandomPeter Huewe
Add a simple test for StirRandom to increase code coverage. It does only check whether the command itself works and returns success for suitable input data. Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
2018-09-12ESYS Tests: Fix some Makefile variableAndreas Fuchs
ESYSFLAGS was actually never set. Probably leftover from an earlier version. Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-08-29ESYS Tests: Fix default tcti handlingAndreas Fuchs
The default tcti parameters must be ignored for the esys unit tests. Fixes: #1016 Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-08-24test: add unit tests for the polling interfaceTadeusz Struk
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
2018-08-23ESYS: Add unit test for crypto backends.Juergen Repp
Several error cases of the crypto backends, which are not covered by the integration tests, are tested. Signed-off-by: Juergen Repp <Juergen.Repp@sit.fraunhofer.de>
2018-08-02ESYS TEST: Added tests for Esys_HMAC and Esys_Hash and minor fixes.Juergen Repp
* The two new integration tests were added to the mandatory tests. * The test clockset was moved from optional to mandatory tests. * Doxygen comments were updated. * Also some minor formatting fixes were added. Signed-off-by: Juergen Repp <Juergen.Repp@sit.fraunhofer.de>
2018-07-30TEST ESYS: Enable tests for physical TPM.Juergen Repp
* To enable tests with a physical TPM the configure options: --with-ptpm=[device] --with-ptpmtests=[test cases] were added. To compile the integration tests --enable-integration has to be used. The test cases are a comma separated list of: mandatory, optional and destructive. The default is mandatory. To avoid parallel usage of the TPM the tests should be executed with: make check-ptpm or with: make check -j 1. The compiled integration tests for a simulator test can be used for tests with a physical TPM without re-compilation. * A second int_log compiler script was added to execute these tests. * Split policy regression tests into two parts. Optional commands are moved to the test policy-regression-opt. * The test policy-ticket will return success if the PolicyTicket command is not available, but all other commands in this tests were successful. * Exponent 0 will be used in the ESAPI integration tests. Exponent 65537 for RSA keys is optional in TPM spec while exponent is mandatory: A TPM compatible with this specification and supporting RSA shall support two primes and an exponent of zero. Support for other values is optional. (Spec Part2 12.2.3.5 TPMS_RSA_PARMS). * The check whether optional commands are available are adapted for the usage with a resource manager TPM. Signed-off-by: Juergen Repp <Juergen.Repp@sit.fraunhofer.de>
2018-07-13build: Use ESYSLDFLAGS instead of -lgcrypt directly.Philip Tricca
All of the other LDFLAGS in the build were fixed up to use ESYSLDFLAGS instead of the linker flags for the crypto library directly. This was probably just an oversight. Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
2018-07-05ESYS: Crypto backend for usage of openssl's libcrypto added.Juergen Repp
* The crypto backend can be selected with the option --with-crypto={ossl,gcrypt}.The default is gcrypt. * Only the crypto provider independent code will remain in esys_crypto.{c,h} The provider dependent code can be found in: esys_crypto_{ossl,cgrypt}.{c,h} * The provider dependent source files are removed from the lists generated in the bootstrap script and are added explicitly to the makefile variables in Makefile.am Signed-off-by: Juergen Repp <Juergen.Repp@sit.fraunhofer.de>
2018-05-04Tests: ESAPI: Null-TCTI-InitializeAndreas Fuchs
Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-05-04Tests: ESAPI: Add test for bound sessionsJuergen Repp
Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-05-01test: add param encrypt-decrytp testTadeusz Struk
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
2018-05-01test: change create_primary_rsa_2048_aes_128_cfb_int to something shorterTadeusz Struk
The long name causes build problems: ccache: error: Failed to create temporary file for test/integration/test_integration_sapi_create_primary_rsa_2048_aes_128_cfb_int-sapi-create-primary-rsa-2048-aes-128-cfb.int.o: File name too long Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
2018-05-01build: Remove --with-simulatorbin, replace with --enable-integration.Philip Tricca
Bill recently integrated the tools integration tests into the test harness and his approach assumes that the `tpm_server` binary is on the PATH. This simplifies a few thing and generally it's just cleaner than requiring the caller to pass the full path to the executable at configure time. This patch removes the --with-simulatorbin configure option replacing it with the --enable-integration option instead. This option takes no parameters but it does check that the 'tpm_server' binary is on the callers path. Additionally this patch consolidates the multiple AC_IF checks for the definition of the associated variable. The corresponding option to the int-log-compiler.sh script is removed as well. Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
2018-04-30test: add sapi prefix to sapi testsTadeusz Struk
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
2018-04-27Tests: ESAPI: Add test for Esys_GetPollHandlesAndreas Fuchs
Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-26Tests: ESAPI: ECC-encrypted sessionSaltsJuergen Repp
Add a test for ECC-encrypted sessionSalt parameters in StartAuthSession. Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-24tcti-mssim: Replace liburiparser with custom key/value pair parser.Philip Tricca
This removes our use of liburiparser with a custom key / value pair parser. The parser is implemented in the key-value-parse module under the util directory. The parser is designed to extract a series of key / value pairs where each key and value are separated by the '=' character and each pair is separated by the ',' character. The parser is composed of three parts: 1) The 'parse_key_value' function is used to extract key /value pairs separated by the '=' character. This function modifies the string by using the 'strok_r' function to extract the key and value. A reference to each is then returned to the caller using the key_value_t structure. 2) The 'parse_key_value_string' function is used to extract each key / value pair parsing the provided string on the ',' character using the same method as the 'parse_key_value' function. Each string containing a key / value pair is then passed to the 'parse_key_value' function to extract the individual components. 3) Finally the 'parse_key_value_string' function is passed a function pointer conforming to the 'KeyValueFunc' type. This function is invoked for each key / value pair extracted and is passed a reference to the key_value_t structure from the previous step. It is also passed a void pointer to some caller provided data structure which allows the callback to do something with the key / value pairs. For the purposes of the mssim TCTI we simply identify valid / invalid keys and store their values in a data structure. Once the parser is done extracting data from the provided string the mssim TCTI will either return an error indicating the configuration string was invalid, or continue initializing the TCTI based on the provided data. If a NULL configuration string is provided defaults are used. Additionally this commit: 1) Removes the check for liburiparser from the autoconf file. 2) Updates the .travis.yml file to no longer install liburiparser as a build dependency. 3) Adds unit tests for the functions described above. 4) Updates existing tests and test infrastructure to use configuration strings in the new format. 5) Updates the man page for the Tss2_Tcti_Mssim_Init fucntion to describe the new configuration string format. 6) Updates the default configuration string to use 'localhost' instead of a raw IPv4 address to make the library friendly to platforms that only support IPv6. Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
2018-04-24tpmclient: remove test/tpmclient/tpmclient.int.hTadeusz Struk
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
2018-04-24tpmclient: move parameter encryption code to session-utilTadeusz Struk
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
2018-04-19Tests/esapi: Add TPM RCsAndreas Fuchs
Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Unit test for tcti-RCsAndreas Fuchs
Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add TR-GetName for HierarchiesAndreas Fuchs
Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add TR functions for keysAndreas Fuchs
Add tests for TR_FromTPMPublic and TR_GetName for persistent key objects Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add TR functions for NVAndreas Fuchs
Add tests for TR_FromTPMPublic and TR_GetName for NV objects Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add test for several Policy CommandsJuergen Repp
Many of the policy commands work similarly. Here we test them using a trial session. Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de> Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add ZGen_2PhaseJuergen Repp
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de> Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add VerifySignatureJuergen Repp
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de> Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add TPM2_TestsJuergen Repp
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de> Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add TestParmsJuergen Repp
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de> Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add StirRandomJuergen Repp
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de> Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add SetAlgorithmSetJuergen Repp
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de> Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add PP_CommandsJuergen Repp
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de> Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add UndefineSpaceSpecialJuergen Repp
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de> Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add PolicyTicketJuergen Repp
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de> Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add PolicyAuthorizeJuergen Repp
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de> Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add ReadLock and WriteLock to MakefileJuergen Repp
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de> Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add NV_CertifyJuergen Repp
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de> Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add LockJuergen Repp
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de> Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add ImportJuergen Repp
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de> Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add HierarchyControlJuergen Repp
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de> Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add GetTimeJuergen Repp
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de> Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
2018-04-19Tests/esapi: Add FirmwareReadJuergen Repp
Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de> Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>