tpm2-tss
tpm2-tss copied to clipboard
1.59: Initial commit
Signed-off-by: malikabhi05 [email protected]
Codecov Report
Merging #2402 (bb361d9) into master (2e4fbb1) will decrease coverage by
0.10%
. The diff coverage is0.00%
.
:exclamation: Current head bb361d9 differs from pull request most recent head 06e71d8. Consider uploading reports for the commit 06e71d8 to get more accurate results
@@ Coverage Diff @@
## master #2402 +/- ##
==========================================
- Coverage 83.62% 83.52% -0.11%
==========================================
Files 351 352 +1
Lines 37962 38001 +39
==========================================
- Hits 31747 31741 -6
- Misses 6215 6260 +45
Impacted Files | Coverage Δ | |
---|---|---|
src/tss2-esys/api/Esys_ACT_SetTimeout.c | 74.02% <ø> (ø) |
|
src/tss2-sys/api/Tss2_Sys_MAC.c | 0.00% <0.00%> (ø) |
|
tss2-dlopen/tss2-dlopen-esys.c | 7.55% <0.00%> (ø) |
|
src/tss2-fapi/ifapi_policy_json_deserialize.c | 84.77% <0.00%> (-0.16%) |
:arrow_down: |
src/tss2-fapi/ifapi_policy_json_serialize.c | 87.87% <0.00%> (-0.02%) |
:arrow_down: |
src/tss2-tcti/tcti-swtpm.c | 89.76% <0.00%> (ø) |
|
src/tss2-esys/api/Esys_Commit.c | 93.93% <0.00%> (ø) |
|
src/tss2-esys/api/Esys_PCR_Read.c | 92.85% <0.00%> (ø) |
|
src/tss2-esys/api/Esys_EC_Ephemeral.c | 93.58% <0.00%> (ø) |
|
src/tss2-esys/api/Esys_PCR_Allocate.c | 96.10% <0.00%> (ø) |
|
... and 3 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Nice work so far... I guess we need some unit tests and libtss2-mu seems to be affected...
@malikabhi05 can you apply this diff and I think we're done:
diff --git a/include/tss2/tss2_tpm2_types.h b/include/tss2/tss2_tpm2_types.h
index 5d2aff4f0b23..205abd50f29b 100644
--- a/include/tss2/tss2_tpm2_types.h
+++ b/include/tss2/tss2_tpm2_types.h
@@ -949,7 +949,7 @@ typedef struct TPMS_ALGORITHM_DESCRIPTION TPMS_ALGORITHM_DESCRIPTION DEPRECATED;
struct TPMS_ALGORITHM_DESCRIPTION {
TPM2_ALG_ID alg; /* an algorithm */
TPMA_ALGORITHM attributes; /* the attributes of the algorithm */
-};
+} DEPRECATED;
/* Definition of TPMU_HA Union <INOUT S> */
typedef union TPMU_HA TPMU_HA;
diff --git a/src/tss2-esys/esys_int.h b/src/tss2-esys/esys_int.h
index fe383061a830..f617b111563d 100644
--- a/src/tss2-esys/esys_int.h
+++ b/src/tss2-esys/esys_int.h
@@ -84,10 +84,7 @@ typedef struct {
TPM2B_AUTH authData;
} HMAC_Start_IN;
-typedef struct {
- TPM2B_AUTH *auth;
- TPM2B_AUTH authData;
-} MAC_Start_IN;
+typedef HMAC_Start_IN MAC_Start_IN;
typedef struct {
ESYS_TR authHandle;
diff --git a/test/integration/sys-hmac.int.c b/test/integration/sys-hmac.int.c
index 78f0babed73c..04c70d5dd77e 100644
--- a/test/integration/sys-hmac.int.c
+++ b/test/integration/sys-hmac.int.c
@@ -87,14 +87,8 @@ test_sys_hmac(TSS2_SYS_CONTEXT * sys_context)
.buffer={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
1, 2, 3, 4, 5, 6, 7, 8, 9}};
- rc = Tss2_Sys_HMAC(sys_context, primaryHandle, &sessions_cmd, &test_buffer,
- TPM2_ALG_SHA256, &outHMAC, &sessions_rsp);
-
- if (rc == 0x922) {
- rc = Tss2_Sys_HMAC(sys_context, primaryHandle, &sessions_cmd, &test_buffer,
- TPM2_ALG_SHA256, &outHMAC, &sessions_rsp);
- }
-
+ rc = TSS2_RETRY_EXP(Tss2_Sys_HMAC(sys_context, primaryHandle, &sessions_cmd, &test_buffer,
+ TPM2_ALG_SHA256, &outHMAC, &sessions_rsp));
if (rc != TSS2_RC_SUCCESS) {
LOG_ERROR("Tss2_Sys_MAC FAILED! Response Code : 0x%x", rc);
}
diff --git a/test/integration/sys-mac.int.c b/test/integration/sys-mac.int.c
index 410d9a6d2b35..dd921465e8b9 100644
--- a/test/integration/sys-mac.int.c
+++ b/test/integration/sys-mac.int.c
@@ -87,14 +87,8 @@ test_sys_mac(TSS2_SYS_CONTEXT * sys_context)
.buffer={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
1, 2, 3, 4, 5, 6, 7, 8, 9}};
- rc = Tss2_Sys_MAC(sys_context, primaryHandle, &sessions_cmd, &test_buffer,
- TPM2_ALG_SHA256, &outMAC, &sessions_rsp);
-
- if (rc == 0x922) {
- rc = Tss2_Sys_MAC(sys_context, primaryHandle, &sessions_cmd, &test_buffer,
- TPM2_ALG_SHA256, &outMAC, &sessions_rsp);
- }
-
+ rc = TSS2_RETRY_EXP(Tss2_Sys_MAC(sys_context, primaryHandle, &sessions_cmd, &test_buffer,
+ TPM2_ALG_SHA256, &outMAC, &sessions_rsp));
Codecov Report
Merging #2402 (7b83d90) into master (6c88eea) will decrease coverage by
0.21%
. The diff coverage is69.79%
.
:exclamation: Current head 7b83d90 differs from pull request most recent head 561b38f. Consider uploading reports for the commit 561b38f to get more accurate results
@@ Coverage Diff @@
## master #2402 +/- ##
==========================================
- Coverage 83.62% 83.41% -0.22%
==========================================
Files 351 362 +11
Lines 37959 40159 +2200
==========================================
+ Hits 31745 33497 +1752
- Misses 6214 6662 +448
Impacted Files | Coverage Δ | |
---|---|---|
src/tss2-esys/api/Esys_Commit.c | 93.93% <ø> (ø) |
|
src/tss2-esys/api/Esys_EC_Ephemeral.c | 93.58% <ø> (ø) |
|
src/tss2-esys/api/Esys_GetCapability.c | 96.15% <ø> (ø) |
|
src/tss2-esys/api/Esys_GetTestResult.c | 93.58% <ø> (ø) |
|
src/tss2-esys/api/Esys_PCR_Allocate.c | 96.10% <ø> (ø) |
|
src/tss2-esys/api/Esys_PCR_Read.c | 92.85% <ø> (ø) |
|
src/tss2-esys/esys_iutil.c | 91.33% <ø> (ø) |
|
src/tss2-esys/esys_mu.c | 91.53% <0.00%> (+2.88%) |
:arrow_up: |
src/tss2-fapi/fapi_crypto.c | 78.80% <ø> (+1.16%) |
:arrow_up: |
src/tss2-mu/base-types.c | 70.00% <ø> (ø) |
|
... and 53 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more