diff --git a/Dockerfile b/Dockerfile index eb00d8788..9f321768c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -73,4 +73,3 @@ RUN ./bootstrap \ && make install \ && ldconfig RUN cat test-suite.log - diff --git a/Doxyfile.in b/Doxyfile.in index b155eee19..81fd17ba2 100644 --- a/Doxyfile.in +++ b/Doxyfile.in @@ -56,7 +56,7 @@ PROJECT_BRIEF = "TPM Software stack 2.0 TCG spec compliant implementati # pixels and the maximum width should not exceed 200 pixels. Doxygen will copy # the logo to the output directory. -PROJECT_LOGO = +PROJECT_LOGO = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path # into which the generated documentation will be written. If a relative path is @@ -123,7 +123,7 @@ REPEAT_BRIEF = YES # the entity):The $name class, The $name widget, The $name file, is, provides, # specifies, contains, represents, a, an and the. -ABBREVIATE_BRIEF = +ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # doxygen will generate a detailed section even if there is only a brief @@ -157,7 +157,7 @@ FULL_PATH_NAMES = YES # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. -STRIP_FROM_PATH = +STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which @@ -166,7 +166,7 @@ STRIP_FROM_PATH = # specify the list of include paths that are normally passed to the compiler # using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but # less readable) file names. This can be useful is your file systems doesn't @@ -233,13 +233,13 @@ TAB_SIZE = 4 # "Side Effects:". You can put \n's in the value part of an alias to insert # newlines. -ALIASES = +ALIASES = # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding "class=itcl::class" # will allow you to use the command class in the itcl::class meaning. -TCL_SUBST = +TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For @@ -286,7 +286,7 @@ OPTIMIZE_OUTPUT_VHDL = NO # Note that for custom extensions you also need to set FILE_PATTERNS otherwise # the files are not read by doxygen. -EXTENSION_MAPPING = +EXTENSION_MAPPING = # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments # according to the Markdown format, which allows for more readable @@ -634,7 +634,7 @@ GENERATE_DEPRECATEDLIST= YES # sections, marked by \if ... \endif and \cond # ... \endcond blocks. -ENABLED_SECTIONS = +ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the # initial value of a variable or macro / define can have for it to appear in the @@ -676,7 +676,7 @@ SHOW_NAMESPACES = YES # by doxygen. Whatever the program writes to standard output is used as the file # version. For an example see the documentation. -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated @@ -689,7 +689,7 @@ FILE_VERSION_FILTER = # DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE # tag is left empty. -LAYOUT_FILE = +LAYOUT_FILE = # The CITE_BIB_FILES tag can be used to specify one or more bib files containing # the reference definitions. This must be a list of .bib files. The .bib @@ -699,7 +699,7 @@ LAYOUT_FILE = # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the # search path. See also \cite for info how to create references. -CITE_BIB_FILES = +CITE_BIB_FILES = #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages @@ -764,7 +764,7 @@ WARN_FORMAT = "$file:$line: $text" # messages should be written. If left blank the output is written to standard # error (stderr). -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # Configuration options related to the input files @@ -846,7 +846,7 @@ INPUT = @top_srcdir@/doc/coding_standard_c.md \ @top_srcdir@/test/integration/esys-tr-getName-hierarchy.int.c \ @top_srcdir@/test/integration/esys-unseal-password-auth.int.c \ @top_srcdir@/test/integration/esys-verify-signature.int.c \ - @top_srcdir@/test/integration/esys-zgen-2phase.int.c + @top_srcdir@/test/integration/esys-zgen-2phase.int.c # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv @@ -888,7 +888,7 @@ RECURSIVE = YES # Note that relative paths are relative to the directory from which doxygen is # run. -EXCLUDE = +EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded @@ -904,7 +904,7 @@ EXCLUDE_SYMLINKS = NO # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the @@ -921,7 +921,7 @@ EXCLUDE_SYMBOLS = *_IN IESYS_CMD_IN_PARAM # that contain example code fragments that are included (see the \include # command). -EXAMPLE_PATH = +EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and @@ -941,7 +941,7 @@ EXAMPLE_RECURSIVE = NO # that contain images that are to be included in the documentation (see the # \image command). -IMAGE_PATH = +IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program @@ -962,7 +962,7 @@ IMAGE_PATH = # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. -INPUT_FILTER = +INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the @@ -975,7 +975,7 @@ INPUT_FILTER = # need to set EXTENSION_MAPPING for the extension otherwise the files are not # properly processed by doxygen. -FILTER_PATTERNS = +FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will also be used to filter the input files that are used for @@ -990,7 +990,7 @@ FILTER_SOURCE_FILES = NO # *.ext= (so without naming a filter). # This tag requires that the tag FILTER_SOURCE_FILES is set to YES. -FILTER_SOURCE_PATTERNS = +FILTER_SOURCE_PATTERNS = # If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page @@ -1102,7 +1102,7 @@ CLANG_ASSISTED_PARSING = NO # specified with INPUT and INCLUDE_PATH. # This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. -CLANG_OPTIONS = +CLANG_OPTIONS = #--------------------------------------------------------------------------- # Configuration options related to the alphabetical class index @@ -1128,7 +1128,7 @@ COLS_IN_ALPHA_INDEX = 5 # while generating the index headers. # This tag requires that the tag ALPHABETICAL_INDEX is set to YES. -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the HTML output @@ -1172,7 +1172,7 @@ HTML_FILE_EXTENSION = .html # of the possible markers and block names see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_HEADER = +HTML_HEADER = # The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each # generated HTML page. If the tag is left blank doxygen will generate a standard @@ -1182,7 +1182,7 @@ HTML_HEADER = # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_FOOTER = +HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of @@ -1194,7 +1194,7 @@ HTML_FOOTER = # obsolete. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_STYLESHEET = +HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined # cascading style sheets that are included after the standard style sheets @@ -1207,7 +1207,7 @@ HTML_STYLESHEET = # list). For an example see the documentation. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_STYLESHEET = +HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note @@ -1217,7 +1217,7 @@ HTML_EXTRA_STYLESHEET = # files will be copied as-is; there are no commands or markers available. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_EXTRA_FILES = +HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen # will adjust the colors in the style sheet and background images according to @@ -1346,7 +1346,7 @@ GENERATE_HTMLHELP = NO # written to the html output directory. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -CHM_FILE = +CHM_FILE = # The HHC_LOCATION tag can be used to specify the location (absolute path # including file name) of the HTML help compiler (hhc.exe). If non-empty, @@ -1354,7 +1354,7 @@ CHM_FILE = # The file has to be specified with full path. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -HHC_LOCATION = +HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated # (YES) or that it should be included in the master .chm file (NO). @@ -1367,7 +1367,7 @@ GENERATE_CHI = NO # and project file content. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. -CHM_INDEX_ENCODING = +CHM_INDEX_ENCODING = # The BINARY_TOC flag controls whether a binary table of contents is generated # (YES) or a normal table of contents (NO) in the .chm file. Furthermore it @@ -1398,7 +1398,7 @@ GENERATE_QHP = NO # the HTML output folder. # This tag requires that the tag GENERATE_QHP is set to YES. -QCH_FILE = +QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help # Project output. For more information please see Qt Help Project / Namespace @@ -1423,7 +1423,7 @@ QHP_VIRTUAL_FOLDER = doc # filters). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_CUST_FILTER_NAME = +QHP_CUST_FILTER_NAME = # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see Qt Help Project / Custom @@ -1431,21 +1431,21 @@ QHP_CUST_FILTER_NAME = # filters). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_CUST_FILTER_ATTRS = +QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's filter section matches. Qt Help Project / Filter Attributes (see: # http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). # This tag requires that the tag GENERATE_QHP is set to YES. -QHP_SECT_FILTER_ATTRS = +QHP_SECT_FILTER_ATTRS = # The QHG_LOCATION tag can be used to specify the location of Qt's # qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the # generated .qhp file. # This tag requires that the tag GENERATE_QHP is set to YES. -QHG_LOCATION = +QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be # generated, together with the HTML files, they form an Eclipse help plugin. To @@ -1578,7 +1578,7 @@ MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_EXTENSIONS = +MATHJAX_EXTENSIONS = # The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces # of code that will be used on startup of the MathJax code. See the MathJax site @@ -1586,7 +1586,7 @@ MATHJAX_EXTENSIONS = # example see the documentation. # This tag requires that the tag USE_MATHJAX is set to YES. -MATHJAX_CODEFILE = +MATHJAX_CODEFILE = # When the SEARCHENGINE tag is enabled doxygen will generate a search box for # the HTML output. The underlying search engine uses javascript and DHTML and @@ -1646,7 +1646,7 @@ EXTERNAL_SEARCH = NO # Searching" for details. # This tag requires that the tag SEARCHENGINE is set to YES. -SEARCHENGINE_URL = +SEARCHENGINE_URL = # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed # search data is written to a file for indexing by an external tool. With the @@ -1662,7 +1662,7 @@ SEARCHDATA_FILE = searchdata.xml # projects and redirect the results back to the right project. # This tag requires that the tag SEARCHENGINE is set to YES. -EXTERNAL_SEARCH_ID = +EXTERNAL_SEARCH_ID = # The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen # projects other than the one defined by this configuration file, but that are @@ -1672,7 +1672,7 @@ EXTERNAL_SEARCH_ID = # EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... # This tag requires that the tag SEARCHENGINE is set to YES. -EXTRA_SEARCH_MAPPINGS = +EXTRA_SEARCH_MAPPINGS = #--------------------------------------------------------------------------- # Configuration options related to the LaTeX output @@ -1736,7 +1736,7 @@ PAPER_TYPE = a4 # If left blank no extra packages will be included. # This tag requires that the tag GENERATE_LATEX is set to YES. -EXTRA_PACKAGES = +EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for the # generated LaTeX document. The header should contain everything until the first @@ -1752,7 +1752,7 @@ EXTRA_PACKAGES = # to HTML_HEADER. # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_HEADER = +LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the # generated LaTeX document. The footer should contain everything after the last @@ -1763,7 +1763,7 @@ LATEX_HEADER = # Note: Only use a user-defined footer if you know what you are doing! # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_FOOTER = +LATEX_FOOTER = # The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined # LaTeX style sheets that are included after the standard style sheets created @@ -1774,7 +1774,7 @@ LATEX_FOOTER = # list). # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_EXTRA_STYLESHEET = +LATEX_EXTRA_STYLESHEET = # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the LATEX_OUTPUT output @@ -1782,7 +1782,7 @@ LATEX_EXTRA_STYLESHEET = # markers available. # This tag requires that the tag GENERATE_LATEX is set to YES. -LATEX_EXTRA_FILES = +LATEX_EXTRA_FILES = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is # prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will @@ -1890,14 +1890,14 @@ RTF_HYPERLINKS = NO # default style sheet that doxygen normally uses. # This tag requires that the tag GENERATE_RTF is set to YES. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an RTF document. Syntax is # similar to doxygen's config file. A template extensions file can be generated # using doxygen -e rtf extensionFile. # This tag requires that the tag GENERATE_RTF is set to YES. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = # If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code # with syntax highlighting in the RTF output. @@ -2055,7 +2055,7 @@ PERLMOD_PRETTY = YES # overwrite each other's variables. # This tag requires that the tag GENERATE_PERLMOD is set to YES. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor @@ -2096,7 +2096,7 @@ SEARCH_INCLUDES = YES # preprocessor. # This tag requires that the tag SEARCH_INCLUDES is set to YES. -INCLUDE_PATH = +INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the @@ -2104,7 +2104,7 @@ INCLUDE_PATH = # used. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that are # defined before the preprocessor is started (similar to the -D option of e.g. @@ -2114,7 +2114,7 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = +PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The @@ -2123,7 +2123,7 @@ PREDEFINED = # definition found in the source code. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will # remove all references to function-like macros that are alone on a line, have @@ -2152,13 +2152,13 @@ SKIP_FUNCTION_MACROS = YES # the path). If a tag file is not located in the directory in which doxygen is # run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create a # tag file that is based on the input files it reads. See section "Linking to # external documentation" for more information about the usage of tag files. -GENERATE_TAGFILE = +GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES, all external class will be listed in # the class index. If set to NO, only the inherited external classes will be @@ -2207,14 +2207,14 @@ CLASS_DIAGRAMS = NO # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. -MSCGEN_PATH = +MSCGEN_PATH = # You can include diagrams made with dia in doxygen documentation. Doxygen will # then run dia to produce the diagram and insert it in the documentation. The # DIA_PATH tag allows you to specify the directory where the dia binary resides. # If left empty dia is assumed to be found in the default search path. -DIA_PATH = +DIA_PATH = # If set to YES the inheritance and collaboration graphs will hide inheritance # and usage relations if the target is undocumented or is not a class. @@ -2263,7 +2263,7 @@ DOT_FONTSIZE = 10 # the path where dot can find it using this tag. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_FONTPATH = +DOT_FONTPATH = # If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for # each documented class showing the direct and indirect inheritance relations. @@ -2409,26 +2409,26 @@ INTERACTIVE_SVG = NO # found. If left blank, it is assumed the dot tool can be found in the path. # This tag requires that the tag HAVE_DOT is set to YES. -DOT_PATH = +DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the \dotfile # command). # This tag requires that the tag HAVE_DOT is set to YES. -DOTFILE_DIRS = +DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the \mscfile # command). -MSCFILE_DIRS = +MSCFILE_DIRS = # The DIAFILE_DIRS tag can be used to specify one or more directories that # contain dia files that are included in the documentation (see the \diafile # command). -DIAFILE_DIRS = +DIAFILE_DIRS = # When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the # path where java can find the plantuml.jar file. If left blank, it is assumed @@ -2436,12 +2436,12 @@ DIAFILE_DIRS = # generate a warning when it encounters a \startuml command in this case and # will not generate output for the diagram. -PLANTUML_JAR_PATH = +PLANTUML_JAR_PATH = # When using plantuml, the specified paths are searched for files specified by # the !include statement in a plantuml block. -PLANTUML_INCLUDE_PATH = +PLANTUML_INCLUDE_PATH = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes # that will be shown in the graph. If the number of nodes in a graph becomes diff --git a/README.md b/README.md index 115b5c784..7ff862844 100644 --- a/README.md +++ b/README.md @@ -170,22 +170,22 @@ SAPI library, TAB/RM, and Test Code Block Diagram: ![Architecture Block Diagram](doc/TSS%20block%20diagram.png) # Project Layout -├── doc : various bits of documentation -├── include : header files installed in $(includedir) -│ └── tss2 : all public headers for this project -├── lib : data files used by the build or installed into $(libdir) -├── m4 : autoconf support macros -├── man : man pages -├── script : scripts used by the build or CI -├── src : all source files -│ ├── tss2-esys : enhanced system API (ESAPI) implementation -│ │   └── api : ESAPI TPM API implementation -│ ├── tss2-mu : TPM2 type marshaling/unmarshaling (MU) API implementation -│ ├── tss2-sys : system API (SAPI) implementation -│ │   └── api : SAPI public API implementation -│ ├── tss2-tcti : TCTI implementations for device and mssim -│ └── util : Internal utility library (e.g. logging framework) -└── test : test code -    ├── integration : integration test harness and test cases -    ├── tpmclient : monolithic, legacy test application -    └── unit : unit tests +├── doc : various bits of documentation\ +├── include : header files installed in $(includedir)\ +│ └── tss2 : all public headers for this project\ +├── lib : data files used by the build or installed into $(libdir)\ +├── m4 : autoconf support macros\ +├── man : man pages\ +├── script : scripts used by the build or CI\ +├── src : all source files\ +│ ├── tss2-esys : enhanced system API (ESAPI) implementation\ +│ │   └── api : ESAPI TPM API implementation\ +│ ├── tss2-mu : TPM2 type marshaling/unmarshaling (MU) API implementation\ +│ ├── tss2-sys : system API (SAPI) implementation\ +│ │   └── api : SAPI public API implementation\ +│ ├── tss2-tcti : TCTI implementations for device and mssim\ +│ └── util : Internal utility library (e.g. logging framework)\ +└── test : test code\ +    ├── integration : integration test harness and test cases\ +    ├── tpmclient : monolithic, legacy test application\ +    └── unit : unit tests diff --git a/doc/coding_standard_c.md b/doc/coding_standard_c.md index c5aabcc98..d84bbb969 100644 --- a/doc/coding_standard_c.md +++ b/doc/coding_standard_c.md @@ -147,7 +147,7 @@ expose a separate set symbols to external consumers. In this case the internal version of the header should be suffixed with '-priv'. Files names are formatted in the same way as described above with the -exception of hyphens "-" separating words. +exception of hyphens "-" separating words. The body of each header file must be surrounded by an include guard (aka "header guard"). These guards shall be given the same name as the file in @@ -246,7 +246,7 @@ A space must separate a control flow statement or function and the opening parenthesis. Line length should not exceed 80 characters and should be split on the nearest -whitespace or delimiter character. When splitting lines with +whitespace or delimiter character. When splitting lines with ### Example ```c diff --git a/doc/doxygen.dox b/doc/doxygen.dox index e781486a8..c898dece3 100644 --- a/doc/doxygen.dox +++ b/doc/doxygen.dox @@ -1060,7 +1060,7 @@ Both the synchronous and asynchronous API are exposed through a single library: For every integration test a function with a name corresponding to the name of the source code file of the test is created: test_esys_(ESYS_CONTEXT * esys_context). -This function is called by the standard function test_invoke_esapi in every integration test. +This function is called by the standard function test_invoke_esapi in every integration test. For some tests different test cases can be created with compiler defines to avoid duplicate code in different test cases.The following defines are used and listed in the function's @@ -1077,7 +1077,7 @@ The ESAPI command calls which are used in a test are listed in the function's do and are marked according to the PC Client Profile Revision 01.03 v22: - (M) Mandatory - (O) Optional -- (F) Commands added after TPM Specification Rev. 1.16 is integrated. +- (F) Commands added after TPM Specification Rev. 1.16 is integrated. \} \{ \fn test_esys_evict_control_serialization(ESYS_CONTEXT * esys_context) @@ -1147,4 +1147,3 @@ and are marked according to the PC Client Profile Revision 01.03 v22: \} \} */ - diff --git a/doc/logging.md b/doc/logging.md index 0652265be..761ce2fe6 100644 --- a/doc/logging.md +++ b/doc/logging.md @@ -29,4 +29,3 @@ Optionally, the default log-level for this module can be set: #define LOGDEFAULT ERROR #include "log.h" ``` - diff --git a/src/tss2-esys/api/Esys_StartAuthSession.c b/src/tss2-esys/api/Esys_StartAuthSession.c index 4dcb8b78d..9c70574a4 100644 --- a/src/tss2-esys/api/Esys_StartAuthSession.c +++ b/src/tss2-esys/api/Esys_StartAuthSession.c @@ -440,7 +440,7 @@ Esys_StartAuthSession_Finish( secret_size += keyHash_size; if (bind != ESYS_TR_NONE && bindNode != NULL) secret_size += bindNode->auth.size; - /* + /* * A non null pointer for secret is required by the subsequent functions, * hence a malloc is called with size 1 if secret_size is zero. */ diff --git a/src/util/log.c b/src/util/log.c index 57e6b40e9..1563ca716 100644 --- a/src/util/log.c +++ b/src/util/log.c @@ -169,4 +169,3 @@ getLogLevel(const char *module, log_level logdefault) } return loglevel; } - diff --git a/test/integration/esys-change-eps.int.c b/test/integration/esys-change-eps.int.c index 11255d5d1..24938d08b 100644 --- a/test/integration/esys-change-eps.int.c +++ b/test/integration/esys-change-eps.int.c @@ -14,7 +14,7 @@ #include "util/log.h" #include "util/aux_util.h" -/** Test the ESAPI function Esys_ChangeEPS. +/** Test the ESAPI function Esys_ChangeEPS. * *\b Note: platform authorization needed. * diff --git a/test/integration/esys-clear.int.c b/test/integration/esys-clear.int.c index 217eae069..7af166bf8 100644 --- a/test/integration/esys-clear.int.c +++ b/test/integration/esys-clear.int.c @@ -13,7 +13,7 @@ #include "util/log.h" #include "util/aux_util.h" -/** Test of the ESAPI function Esys_Clear. +/** Test of the ESAPI function Esys_Clear. * * Tested ESAPI commands: * - Esys_Clear() (M) diff --git a/test/integration/esys-clockset.int.c b/test/integration/esys-clockset.int.c index 91870ecf6..79adbd269 100644 --- a/test/integration/esys-clockset.int.c +++ b/test/integration/esys-clockset.int.c @@ -14,7 +14,7 @@ #include "util/log.h" #include "util/aux_util.h" -/** Test the ESAPI function Esys_ClockSet and Esys_ReadClock. +/** Test the ESAPI function Esys_ClockSet and Esys_ReadClock. * *\b Note: platform authorization needed. * diff --git a/test/integration/esys-ecc-parameters.int.c b/test/integration/esys-ecc-parameters.int.c index f1257358e..7943bfedc 100644 --- a/test/integration/esys-ecc-parameters.int.c +++ b/test/integration/esys-ecc-parameters.int.c @@ -14,7 +14,7 @@ #include "util/log.h" #include "util/aux_util.h" -/** Test the ESAPI function Esys_ECC_Parameters. +/** Test the ESAPI function Esys_ECC_Parameters. * * Tested ESAPI commands: * - Esys_ECC_Parameters() (M) diff --git a/test/integration/esys-field-upgrade.int.c b/test/integration/esys-field-upgrade.int.c index e2769d58e..0933dfcac 100644 --- a/test/integration/esys-field-upgrade.int.c +++ b/test/integration/esys-field-upgrade.int.c @@ -14,7 +14,7 @@ #include "util/log.h" #include "util/aux_util.h" -/** Test the ESAPI function Esys_FieldUpgradeStart and Esys_FieldUpgradeData. +/** Test the ESAPI function Esys_FieldUpgradeStart and Esys_FieldUpgradeData. * * Tested ESAPI commands: * - Esys_FieldUpgradeData() (O) diff --git a/test/integration/esys-firmware-read.int.c b/test/integration/esys-firmware-read.int.c index fcf6b1a63..c716b6f35 100644 --- a/test/integration/esys-firmware-read.int.c +++ b/test/integration/esys-firmware-read.int.c @@ -14,7 +14,7 @@ #include "util/log.h" #include "util/aux_util.h" -/** Test the ESAPI function Esys_FirmwareRead. +/** Test the ESAPI function Esys_FirmwareRead. * * Tested ESAPI commands: * - Esys_FirmwareRead() (O) diff --git a/test/integration/esys-get-random.int.c b/test/integration/esys-get-random.int.c index c23b2d1cb..847fb347b 100644 --- a/test/integration/esys-get-random.int.c +++ b/test/integration/esys-get-random.int.c @@ -13,7 +13,7 @@ #include "util/log.h" #include "util/aux_util.h" -/** Test the ESAPI function Esys_GetRandom. +/** Test the ESAPI function Esys_GetRandom. * * Tested ESAPI commands: * - Esys_GetRandom() (M) diff --git a/test/integration/esys-lock.int.c b/test/integration/esys-lock.int.c index ef77d570a..508f84219 100644 --- a/test/integration/esys-lock.int.c +++ b/test/integration/esys-lock.int.c @@ -14,7 +14,7 @@ #include "util/log.h" #include "util/aux_util.h" -/** Test the ESAPI functions related to TPM locks. +/** Test the ESAPI functions related to TPM locks. * *\b Note: platform authorization needed. * diff --git a/test/integration/esys-set-algorithm-set.int.c b/test/integration/esys-set-algorithm-set.int.c index dd11b0985..ceed7fb0f 100644 --- a/test/integration/esys-set-algorithm-set.int.c +++ b/test/integration/esys-set-algorithm-set.int.c @@ -14,7 +14,7 @@ #include "util/log.h" #include "util/aux_util.h" -/** Test the ESAPI function Esys_SetAlgorithmSet. +/** Test the ESAPI function Esys_SetAlgorithmSet. * *\b Note: platform authorization needed. * diff --git a/test/integration/esys-stir-random.int.c b/test/integration/esys-stir-random.int.c index 103b3ac74..7574a0a3e 100644 --- a/test/integration/esys-stir-random.int.c +++ b/test/integration/esys-stir-random.int.c @@ -13,7 +13,7 @@ #include "util/log.h" #include "util/aux_util.h" -/** Test the ESAPI function Esys_StirRandom. +/** Test the ESAPI function Esys_StirRandom. * * Tested ESAPI commands: * - Esys_StirRandom() (M) diff --git a/test/integration/esys-testparms.int.c b/test/integration/esys-testparms.int.c index 93be62eaa..61fc9c61d 100644 --- a/test/integration/esys-testparms.int.c +++ b/test/integration/esys-testparms.int.c @@ -13,7 +13,7 @@ #include "util/log.h" #include "util/aux_util.h" -/** Test the ESAPI function Esys_TestParms. +/** Test the ESAPI function Esys_TestParms. * * Tested ESAPI commands: * - Esys_TestParms() (M) diff --git a/test/integration/esys-tpm-tests.int.c b/test/integration/esys-tpm-tests.int.c index 7b569df6c..60aa90e5a 100644 --- a/test/integration/esys-tpm-tests.int.c +++ b/test/integration/esys-tpm-tests.int.c @@ -12,7 +12,7 @@ #include "util/log.h" #include "util/aux_util.h" -/** Test the ESAPI functions for TPM tests. +/** Test the ESAPI functions for TPM tests. * * Tested ESAPI commands: * - Esys_GetTestResult() (M) diff --git a/test/integration/main-esapi.c b/test/integration/main-esapi.c index c9422d56a..e1cc39f92 100644 --- a/test/integration/main-esapi.c +++ b/test/integration/main-esapi.c @@ -22,7 +22,7 @@ * The first invocation will be Tss2_Sys_StartUp. */ -TSS2_RC +TSS2_RC (*transmit_hook) (const uint8_t *command_buffer, size_t command_size) = NULL; #define TCTI_PROXY_MAGIC 0x5250584f0a000000ULL /* 'PROXY\0\0\0' */ diff --git a/test/integration/sapi-asymmetric-encrypt-decrypt.int.c b/test/integration/sapi-asymmetric-encrypt-decrypt.int.c index 11253256f..b7dddbee8 100644 --- a/test/integration/sapi-asymmetric-encrypt-decrypt.int.c +++ b/test/integration/sapi-asymmetric-encrypt-decrypt.int.c @@ -160,5 +160,3 @@ test_invoke (TSS2_SYS_CONTEXT *sapi_context) } return 0; } - - diff --git a/test/integration/sapi-pcr-extension.int.c b/test/integration/sapi-pcr-extension.int.c index d4d0b84ba..49bcaf5ef 100644 --- a/test/integration/sapi-pcr-extension.int.c +++ b/test/integration/sapi-pcr-extension.int.c @@ -98,4 +98,3 @@ test_invoke (TSS2_SYS_CONTEXT *sapi_context) LOG_INFO("PCR Extension Test Passed!"); return 0; } - diff --git a/test/integration/sapi-self-test.int.c b/test/integration/sapi-self-test.int.c index 4fc3ad7fe..6ad4219ef 100644 --- a/test/integration/sapi-self-test.int.c +++ b/test/integration/sapi-self-test.int.c @@ -15,9 +15,9 @@ /* * This program contains integration test for SAPI Tss2_Sys_SelfTest - * that perform test of its capabilities. This program is calling + * that perform test of its capabilities. This program is calling * SelfTest SAPI and make sure the response code are success - * when fullTest set as YES and when it is set as NO. + * when fullTest set as YES and when it is set as NO. */ int test_invoke (TSS2_SYS_CONTEXT *sapi_context) diff --git a/test/unit/UINT8-marshal.c b/test/unit/UINT8-marshal.c index 719bb22c4..39f0f522c 100644 --- a/test/unit/UINT8-marshal.c +++ b/test/unit/UINT8-marshal.c @@ -63,7 +63,7 @@ UINT8_marshal_buffer_null_with_offset (void **state) assert_int_equal (offset, 100 + sizeof (src)); } /* - * Test case passing NULL buffer and NULL offset. This + * Test case passing NULL buffer and NULL offset. This */ void UINT8_marshal_buffer_null_offset_null (void **state) diff --git a/test/unit/esys-crypto.c b/test/unit/esys-crypto.c index d611e4122..1ac27da66 100644 --- a/test/unit/esys-crypto.c +++ b/test/unit/esys-crypto.c @@ -31,7 +31,7 @@ check_hash_functions(void **state) uint8_t buffer[10] = { 0 }; TPM2B tpm2b; size_t size = 0; - + rc = iesys_crypto_hash_start(NULL, TPM2_ALG_SHA384); assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); @@ -72,10 +72,10 @@ check_hash_functions(void **state) rc = iesys_crypto_hash_finish(&context, &buffer[0], &size); assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); - + /* cleanup */ iesys_crypto_hmac_abort(&context); -} +} static void check_hmac_functions(void **state) @@ -85,7 +85,7 @@ check_hmac_functions(void **state) uint8_t buffer[10] = { 0 }; TPM2B tpm2b; size_t size = 0; - + rc = iesys_crypto_hmac_start(NULL, TPM2_ALG_SHA384, &buffer[0], 10); assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); @@ -129,7 +129,7 @@ check_hmac_functions(void **state) rc = iesys_crypto_hmac_finish(&context, &buffer[0], &size); assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); - + /* cleanup */ iesys_crypto_hash_abort(&context); } @@ -142,7 +142,7 @@ check_random(void **state) TPM2B_NONCE nonce; rc = iesys_crypto_random2b(&nonce, num_bytes); assert_int_equal (rc, TSS2_RC_SUCCESS); -} +} static void check_pk_encrypt(void **state) @@ -185,7 +185,7 @@ check_pk_encrypt(void **state) } } }; - + inPublicRSA.publicArea.nameAlg = 0; rc = iesys_crypto_pk_encrypt(&inPublicRSA, size, &in_buffer[0], size, &out_buffer[0], &size, "LABEL"); assert_int_equal (rc, TSS2_ESYS_RC_NOT_IMPLEMENTED); @@ -208,7 +208,7 @@ check_aes_encrypt(void **state) rc = iesys_crypto_sym_aes_encrypt(NULL, TPM2_ALG_AES, 192, TPM2_ALG_CFB, 16, &buffer[0], size, &key[0]); assert_int_equal (rc, TSS2_ESYS_RC_BAD_REFERENCE); - + rc = iesys_crypto_sym_aes_encrypt(&key[0], TPM2_ALG_AES, 192, TPM2_ALG_CFB, 16, &buffer[0], size, &key[0]); assert_int_equal (rc, TSS2_RC_SUCCESS); diff --git a/test/unit/esys-sequence-finish.c b/test/unit/esys-sequence-finish.c index 6309ecea1..859c18a5c 100644 --- a/test/unit/esys-sequence-finish.c +++ b/test/unit/esys-sequence-finish.c @@ -21,7 +21,7 @@ /* * Tests whether all ESAPI finish calls handle wrong internal states with the correct - * error response TSS2_ESYS_RC_BAD_SEQUENCE. + * error response TSS2_ESYS_RC_BAD_SEQUENCE. */ static TSS2_RC diff --git a/test/unit/log.c b/test/unit/log.c index 29d8dd0f9..2de0bf928 100644 --- a/test/unit/log.c +++ b/test/unit/log.c @@ -33,7 +33,7 @@ execute_doLog(char *env_log_level){ static void doLog_test (void **state) -{ +{ execute_doLog("ALL+none"); execute_doLog("ALL+unused"); execute_doLog("ALL+error");