1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
commit 6110b3e5c9cb0e56319d5000e9785171ec9b9559
Author: Genli Pan <genli.pan@windriver.com>
Date: Mon Dec 15 11:18:49 2014 +0800
testsuite: fix transport session not released problem
According to TPM Spec v1.2, TPM_ReleaseTransportSigned command uses two
authorization sessions, but testsuite use one authorization session when
release transport session, this causes transport session actually not be
released in TPM unit, even though TPM return success, in haswell. Fix
testsuite_transport_init() in testsuite. After this fix, transport testcases
works both on haswell and crosshill.
Signed-off-by: Genli Pan <genli.pan@windriver.com>
--- testsuite-0.3.orig/tcg/common/common.c 2014-10-15 19:04:50.000000000 +0800
+++ testsuite-0.3/tcg/common/common.c 2014-12-11 15:59:01.000000000 +0800
@@ -2124,12 +2124,19 @@
// Create the key used to sign the transport session
result = Tspi_Context_CreateObject(hContext, TSS_OBJECT_TYPE_RSAKEY,
TSS_KEY_SIZE_512 | TSS_KEY_TYPE_SIGNING |
- TSS_KEY_NO_AUTHORIZATION, hSigningKey);
+ TSS_KEY_AUTHORIZATION, hSigningKey);
if (result != TSS_SUCCESS) {
print_error("Tspi_Context_CreateObject", result);
return result;
}
+ result = Tspi_Policy_AssignToObject(hPolicy, *hSigningKey);
+ if ( result != TSS_SUCCESS )
+ {
+ print_error("Tspi_Policy_AssignToObject", result);
+ return result;
+ }
+
result = Tspi_Key_CreateKey(*hSigningKey, hSRK, 0);
if (result != TSS_SUCCESS) {
print_error("Tspi_Key_CreateKey", result);
|