Skip to content

Commit

Permalink
All: Remove trailing whitespaces and empty lines
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Fuchs <andreas.fuchs@sit.fraunhofer.de>
  • Loading branch information
Andreas Fuchs committed May 21, 2019
1 parent 010ec60 commit be1a0cf
Show file tree
Hide file tree
Showing 28 changed files with 113 additions and 120 deletions.
1 change: 0 additions & 1 deletion Dockerfile
Expand Up @@ -73,4 +73,3 @@ RUN ./bootstrap \
&& make install \
&& ldconfig
RUN cat test-suite.log

126 changes: 63 additions & 63 deletions Doxyfile.in

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions README.md
Expand Up @@ -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
4 changes: 2 additions & 2 deletions doc/coding_standard_c.md
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions doc/doxygen.dox
Expand Up @@ -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_<test_name>(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
Expand All @@ -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)
Expand Down Expand Up @@ -1147,4 +1147,3 @@ and are marked according to the PC Client Profile Revision 01.03 v22:
\}
\}
*/

1 change: 0 additions & 1 deletion doc/logging.md
Expand Up @@ -29,4 +29,3 @@ Optionally, the default log-level for this module can be set:
#define LOGDEFAULT ERROR
#include "log.h"
```

2 changes: 1 addition & 1 deletion src/tss2-esys/api/Esys_StartAuthSession.c
Expand Up @@ -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.
*/
Expand Down
1 change: 0 additions & 1 deletion src/util/log.c
Expand Up @@ -169,4 +169,3 @@ getLogLevel(const char *module, log_level logdefault)
}
return loglevel;
}

2 changes: 1 addition & 1 deletion test/integration/esys-change-eps.int.c
Expand Up @@ -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.
*
Expand Down
2 changes: 1 addition & 1 deletion test/integration/esys-clear.int.c
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/esys-clockset.int.c
Expand Up @@ -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.
*
Expand Down
2 changes: 1 addition & 1 deletion test/integration/esys-ecc-parameters.int.c
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/esys-field-upgrade.int.c
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/esys-firmware-read.int.c
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/esys-get-random.int.c
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/esys-lock.int.c
Expand Up @@ -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.
*
Expand Down
2 changes: 1 addition & 1 deletion test/integration/esys-set-algorithm-set.int.c
Expand Up @@ -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.
*
Expand Down
2 changes: 1 addition & 1 deletion test/integration/esys-stir-random.int.c
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/esys-testparms.int.c
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/esys-tpm-tests.int.c
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/integration/main-esapi.c
Expand Up @@ -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' */
Expand Down
2 changes: 0 additions & 2 deletions test/integration/sapi-asymmetric-encrypt-decrypt.int.c
Expand Up @@ -160,5 +160,3 @@ test_invoke (TSS2_SYS_CONTEXT *sapi_context)
}
return 0;
}


1 change: 0 additions & 1 deletion test/integration/sapi-pcr-extension.int.c
Expand Up @@ -98,4 +98,3 @@ test_invoke (TSS2_SYS_CONTEXT *sapi_context)
LOG_INFO("PCR Extension Test Passed!");
return 0;
}

4 changes: 2 additions & 2 deletions test/integration/sapi-self-test.int.c
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/unit/UINT8-marshal.c
Expand Up @@ -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)
Expand Down
16 changes: 8 additions & 8 deletions test/unit/esys-crypto.c
Expand Up @@ -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);

Expand Down Expand Up @@ -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)
Expand All @@ -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);

Expand Down Expand Up @@ -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);
}
Expand All @@ -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)
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion test/unit/esys-sequence-finish.c
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/unit/log.c
Expand Up @@ -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");
Expand Down

0 comments on commit be1a0cf

Please sign in to comment.