aboutsummaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorPhilip Tricca <philip.b.tricca@intel.com>2018-04-18 08:36:06 -0700
committerPhilip Tricca <philip.b.tricca@intel.com>2018-04-24 12:01:51 -0700
commite394cffe3add7874299b9571e0b5140b4dc51dfe (patch)
tree0f35dcf5eb80d05a519aedb2544126f27a41f71c /.travis.yml
parentf517ee5a1afe58d30662167fb7fca55366c8137d (diff)
downloadtpm2-tss-e394cffe3add7874299b9571e0b5140b4dc51dfe.tar.gz
tcti-mssim: Replace liburiparser with custom key/value pair parser.
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>
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml1
1 files changed, 0 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml
index 7c5a67e1..237a9aac 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,7 +25,6 @@ addons:
- autoconf-archive
- cmake
- libgcrypt20-dev
- - liburiparser-dev
- realpath
- lcov
- libssl-dev