Merge ~jocave/plainbox-provider-tpm2:move-to-roots-home into plainbox-provider-tpm2:master
- Git
- lp:~jocave/plainbox-provider-tpm2
- move-to-roots-home
- Merge into master
Status: | Merged |
---|---|
Approved by: | Sylvain Pineau |
Approved revision: | 613fce98038e4ff29a1f1c6554eff8da18f8d24f |
Merged at revision: | 0051b65e97bc4910913ad7b4976f76222259f6bd |
Proposed branch: | ~jocave/plainbox-provider-tpm2:move-to-roots-home |
Merge into: | plainbox-provider-tpm2:master |
Diff against target: |
879 lines (+167/-142) 25 files modified
bin/test_tpm2_activecredential.sh (+10/-10) bin/test_tpm2_akparse.sh (+2/-2) bin/test_tpm2_certify.sh (+7/-7) bin/test_tpm2_create_all.sh (+5/-5) bin/test_tpm2_createprimary_all.sh (+3/-3) bin/test_tpm2_encryptdecrypt.sh (+9/-9) bin/test_tpm2_evictcontrol.sh (+5/-5) bin/test_tpm2_getpubak.sh (+3/-3) bin/test_tpm2_getpubek.sh (+1/-1) bin/test_tpm2_getrandom.sh (+2/-2) bin/test_tpm2_getrandom_func.sh (+2/-2) bin/test_tpm2_hash.sh (+4/-4) bin/test_tpm2_hmac.sh (+10/-10) bin/test_tpm2_listpcrs.sh (+2/-2) bin/test_tpm2_load.sh (+7/-7) bin/test_tpm2_loadexternal.sh (+7/-7) bin/test_tpm2_makecredential.sh (+9/-9) bin/test_tpm2_nv.sh (+2/-2) bin/test_tpm2_readpublic.sh (+7/-7) bin/test_tpm2_rsadecrypt.sh (+9/-9) bin/test_tpm2_rsaencrypt.sh (+7/-7) bin/test_tpm2_sign.sh (+10/-10) bin/test_tpm2_unseal.sh (+7/-7) bin/test_tpm2_verifysignature.sh (+12/-12) units/tpm2_1.1.pxu (+25/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Devices Certification Bot | Needs Fixing | ||
Sylvain Pineau (community) | Approve | ||
Jonathan Cave (community) | Needs Resubmitting | ||
Review via email: mp+359917@code.launchpad.net |
Commit message
Description of the change
We need a quick solution for tpm2 tests to pass now that checkbox is running as a service as root. This is quickest (and dirtiest) solution I think we have.
Jonathan Cave (jocave) wrote : | # |
Modifed the tpm2_1.1 jobs to ensure run as root.
Sylvain Pineau (sylvain-pineau) wrote : | # |
"Don't push the red button!"
I did
Devices Certification Bot (ce-certification-qa) wrote : | # |
The merge was fine but running tests failed.
[trusty] [07:51:28] starting container
Device project added to trusty-testing
[xenial] [07:51:33] starting container
[xenial] [07:51:34] Unable to start ephemeral container!
[xenial] output: https:/
[xenial] NOTE: unable to execute tests, marked as failed
[xenial] Destroying failed container to reclaim resources
[bionic] [07:51:48] starting container
[bionic] [07:51:49] Unable to start ephemeral container!
[trusty] [07:51:50] provisioning container
[bionic] output: https:/
[bionic] NOTE: unable to execute tests, marked as failed
[bionic] Destroying failed container to reclaim resources
[trusty] [07:53:17] Starting tests...
[trusty] Found a test script: ./requirements/
[trusty] [07:54:47] container-
[trusty] [07:54:47] Fixing file permissions in source directory
[trusty] [07:54:47] Destroying container
Devices Certification Bot (ce-certification-qa) wrote : | # |
The merge was fine but running tests failed.
[xenial] [10:10:54] starting container
[xenial] [10:10:55] Unable to start ephemeral container!
[bionic] [10:10:56] starting container
[bionic] [10:10:57] Unable to start ephemeral container!
[xenial] output: https:/
[xenial] NOTE: unable to execute tests, marked as failed
[xenial] Destroying failed container to reclaim resources
[bionic] output: https:/
[bionic] NOTE: unable to execute tests, marked as failed
[bionic] Destroying failed container to reclaim resources
[trusty] [10:11:14] starting container
Device project added to trusty-testing
[trusty] [10:11:25] provisioning container
[trusty] [10:12:42] Starting tests...
[trusty] Found a test script: ./requirements/
[trusty] [10:13:26] container-
[trusty] [10:13:26] Fixing file permissions in source directory
[trusty] [10:13:26] Destroying container
Preview Diff
1 | diff --git a/bin/test_tpm2_activecredential.sh b/bin/test_tpm2_activecredential.sh | |||
2 | index 01d31b6..a2f67c7 100755 | |||
3 | --- a/bin/test_tpm2_activecredential.sh | |||
4 | +++ b/bin/test_tpm2_activecredential.sh | |||
5 | @@ -37,12 +37,12 @@ ak_alg=0x0001 | |||
6 | 37 | digestAlg=0x000B | 37 | digestAlg=0x000B |
7 | 38 | signAlg=0x0014 | 38 | signAlg=0x0014 |
8 | 39 | 39 | ||
15 | 40 | file_input_data=/home/$USER/secret.data | 40 | file_input_data=/root/secret.data |
16 | 41 | output_ek_pub=/home/$USER/ek_pub.out | 41 | output_ek_pub=/root/ek_pub.out |
17 | 42 | output_ak_pub=/home/$USER/ak_pub.out | 42 | output_ak_pub=/root/ak_pub.out |
18 | 43 | output_ak_pub_name=/home/$USER/ak_name_pub.out | 43 | output_ak_pub_name=/root/ak_name_pub.out |
19 | 44 | output_mkcredential=/home/$USER/mkcredential.out | 44 | output_mkcredential=/root/mkcredential.out |
20 | 45 | output_actcredential=/home/$USER/actcredential.out | 45 | output_actcredential=/root/actcredential.out |
21 | 46 | 46 | ||
22 | 47 | fail() | 47 | fail() |
23 | 48 | { | 48 | { |
24 | @@ -62,12 +62,12 @@ if [ $? != 0 ] || [ ! -e $output_ek_pub ];then | |||
25 | 62 | fail getpubek | 62 | fail getpubek |
26 | 63 | fi | 63 | fi |
27 | 64 | 64 | ||
30 | 65 | tpm2_getpubak -E $handle_ek -k $handle_ak -g $ak_alg -D $digestAlg -s $signAlg -f $output_ak_pub -n $output_ak_pub_name |tee /home/$USER/output_ak | 65 | tpm2_getpubak -E $handle_ek -k $handle_ak -g $ak_alg -D $digestAlg -s $signAlg -f $output_ak_pub -n $output_ak_pub_name |tee /root/output_ak |
31 | 66 | if [ $? != 0 ] || [ ! -e /home/$USER/output_ak ];then | 66 | if [ $? != 0 ] || [ ! -e /root/output_ak ];then |
32 | 67 | fail getpubak | 67 | fail getpubak |
33 | 68 | fi | 68 | fi |
36 | 69 | grep -A 3 "Name of loaded key:" /home/$USER/output_ak|tr "\n" " " >/home/$USER/grep.txt | 69 | grep -A 3 "Name of loaded key:" /root/output_ak|tr "\n" " " >/root/grep.txt |
37 | 70 | Loadkeyname=`sed -e 's/ //g' /home/$USER/grep.txt | awk -F':' '{print $2}'` | 70 | Loadkeyname=`sed -e 's/ //g' /root/grep.txt | awk -F':' '{print $2}'` |
38 | 71 | 71 | ||
39 | 72 | tpm2_makecredential -e $output_ek_pub -s $file_input_data -n $Loadkeyname -o $output_mkcredential | 72 | tpm2_makecredential -e $output_ek_pub -s $file_input_data -n $Loadkeyname -o $output_mkcredential |
40 | 73 | if [ $? != 0 ];then | 73 | if [ $? != 0 ];then |
41 | diff --git a/bin/test_tpm2_akparse.sh b/bin/test_tpm2_akparse.sh | |||
42 | index 40785f0..ff00ae5 100755 | |||
43 | --- a/bin/test_tpm2_akparse.sh | |||
44 | +++ b/bin/test_tpm2_akparse.sh | |||
45 | @@ -34,8 +34,8 @@ | |||
46 | 34 | new_path=`dirname $0` | 34 | new_path=`dirname $0` |
47 | 35 | PATH="$PATH":"$new_path" | 35 | PATH="$PATH":"$new_path" |
48 | 36 | 36 | ||
51 | 37 | file_input_data=/home/$USER/ak_pub.out | 37 | file_input_data=/root/ak_pub.out |
52 | 38 | output_akparse=/home/$USER/akparse.out | 38 | output_akparse=/root/akparse.out |
53 | 39 | 39 | ||
54 | 40 | rm $output_ekparse -rf | 40 | rm $output_ekparse -rf |
55 | 41 | 41 | ||
56 | diff --git a/bin/test_tpm2_certify.sh b/bin/test_tpm2_certify.sh | |||
57 | index 56e23a6..dd1e17d 100755 | |||
58 | --- a/bin/test_tpm2_certify.sh | |||
59 | +++ b/bin/test_tpm2_certify.sh | |||
60 | @@ -30,13 +30,13 @@ | |||
61 | 30 | # THE POSSIBILITY OF SUCH DAMAGE. | 30 | # THE POSSIBILITY OF SUCH DAMAGE. |
62 | 31 | #;**********************************************************************; | 31 | #;**********************************************************************; |
63 | 32 | #!/bin/bash | 32 | #!/bin/bash |
71 | 33 | file_primary_key_ctx=/home/$USER/context.p_B1 | 33 | file_primary_key_ctx=/root/context.p_B1 |
72 | 34 | file_certify_key_pub=/home/$USER/opuB1_B8 | 34 | file_certify_key_pub=/root/opuB1_B8 |
73 | 35 | file_certify_key_priv=/home/$USER/oprB1_B8 | 35 | file_certify_key_priv=/root/oprB1_B8 |
74 | 36 | file_certify_key_ctx=/home/$USER/context_load_out_B1_B8 | 36 | file_certify_key_ctx=/root/context_load_out_B1_B8 |
75 | 37 | file_certify_key_name=/home/$USER/name.load.B1_B8 | 37 | file_certify_key_name=/root/name.load.B1_B8 |
76 | 38 | file_output_attest=/home/$USER/attest.out | 38 | file_output_attest=/root/attest.out |
77 | 39 | file_output_signature=/home/$USER/certify_signature.out | 39 | file_output_signature=/root/certify_signature.out |
78 | 40 | 40 | ||
79 | 41 | 41 | ||
80 | 42 | alg_hash=0x000B | 42 | alg_hash=0x000B |
81 | diff --git a/bin/test_tpm2_create_all.sh b/bin/test_tpm2_create_all.sh | |||
82 | index 7664c70..81056a3 100755 | |||
83 | --- a/bin/test_tpm2_create_all.sh | |||
84 | +++ b/bin/test_tpm2_create_all.sh | |||
85 | @@ -39,9 +39,9 @@ GAlg= | |||
86 | 39 | gAlgList="0x04 0x0B" | 39 | gAlgList="0x04 0x0B" |
87 | 40 | STATUS=0 | 40 | STATUS=0 |
88 | 41 | 41 | ||
90 | 42 | rm -f /home/$USER/create.error.log /home/$USER/opr* /home/$USER/opu* | 42 | rm -f /root/create.error.log /root/opr* /root/opu* |
91 | 43 | 43 | ||
93 | 44 | ctx_count=`ls /home/$USER/ | grep -c ^ctx.cpri` | 44 | ctx_count=`ls /root/ | grep -c ^ctx.cpri` |
94 | 45 | if [ $ctx_count -le 1 ];then | 45 | if [ $ctx_count -le 1 ];then |
95 | 46 | echo "we should execute test_tpm2_createprimary_all.sh first!" | 46 | echo "we should execute test_tpm2_createprimary_all.sh first!" |
96 | 47 | test_tpm2_createprimary_all.sh | 47 | test_tpm2_createprimary_all.sh |
97 | @@ -59,16 +59,16 @@ if [[ "$@" == *"--sm3256"* ]]; then | |||
98 | 59 | gAlgList="$gAlgList 0x12" | 59 | gAlgList="$gAlgList 0x12" |
99 | 60 | fi | 60 | fi |
100 | 61 | 61 | ||
102 | 62 | for pCtx in `ls /home/$USER/ctx.cpri*` | 62 | for pCtx in `ls /root/ctx.cpri*` |
103 | 63 | do | 63 | do |
104 | 64 | for gAlg in $gAlgList | 64 | for gAlg in $gAlgList |
105 | 65 | do | 65 | do |
106 | 66 | for GAlg in 0x01 0x08 0x23 0x25 | 66 | for GAlg in 0x01 0x08 0x23 0x25 |
107 | 67 | do | 67 | do |
109 | 68 | tpm2_create -c $pCtx -g $gAlg -G $GAlg -o /home/$USER/opu."$pCtx".g"$gAlg".G"$GAlg" -O /home/$USER/opr."$pCtx".g"$gAlg".G"$GAlg" | 68 | tpm2_create -c $pCtx -g $gAlg -G $GAlg -o /root/opu."$pCtx".g"$gAlg".G"$GAlg" -O /root/opr."$pCtx".g"$gAlg".G"$GAlg" |
110 | 69 | if [ $? != 0 ];then | 69 | if [ $? != 0 ];then |
111 | 70 | echo "tpm2_create error: pCtx=$pCtx gAlg=$gAlg GAlg=$GAlg" | 70 | echo "tpm2_create error: pCtx=$pCtx gAlg=$gAlg GAlg=$GAlg" |
113 | 71 | echo "tpm2_create error: pCtx=$pCtx gAlg=$gAlg GAlg=$GAlg" >> /home/$USER/create.error.log | 71 | echo "tpm2_create error: pCtx=$pCtx gAlg=$gAlg GAlg=$GAlg" >> /root/create.error.log |
114 | 72 | STATUS=1 | 72 | STATUS=1 |
115 | 73 | fi | 73 | fi |
116 | 74 | done | 74 | done |
117 | diff --git a/bin/test_tpm2_createprimary_all.sh b/bin/test_tpm2_createprimary_all.sh | |||
118 | index b7f5f9a..658b6ab 100755 | |||
119 | --- a/bin/test_tpm2_createprimary_all.sh | |||
120 | +++ b/bin/test_tpm2_createprimary_all.sh | |||
121 | @@ -54,7 +54,7 @@ if [[ "$@" == *"--platform"* ]]; then | |||
122 | 54 | AtypeList="$AtypeList p" | 54 | AtypeList="$AtypeList p" |
123 | 55 | fi | 55 | fi |
124 | 56 | 56 | ||
126 | 57 | rm -f /home/$USER/createprimary.error.log /home/$USER/ctx.cpri.* | 57 | rm -f /root/createprimary.error.log /root/ctx.cpri.* |
127 | 58 | 58 | ||
128 | 59 | for gAlg in $gAlgList | 59 | for gAlg in $gAlgList |
129 | 60 | do | 60 | do |
130 | @@ -62,10 +62,10 @@ for gAlg in $gAlgList | |||
131 | 62 | do | 62 | do |
132 | 63 | for Atype in $AtypeList | 63 | for Atype in $AtypeList |
133 | 64 | do | 64 | do |
135 | 65 | tpm2_createprimary -A $Atype -g $gAlg -G $GAlg -C /home/$USER/ctx.cpri."$Atype".g"$gAlg".G"$GAlg" | 65 | tpm2_createprimary -A $Atype -g $gAlg -G $GAlg -C /root/ctx.cpri."$Atype".g"$gAlg".G"$GAlg" |
136 | 66 | if [ $? != 0 ];then | 66 | if [ $? != 0 ];then |
137 | 67 | echo "tpm2_createprimary error: Atype=$Atype gAlg=$gAlg GAlg=$GAlg" | 67 | echo "tpm2_createprimary error: Atype=$Atype gAlg=$gAlg GAlg=$GAlg" |
139 | 68 | echo "tpm2_createprimary error: Atype=$Atype gAlg=$gAlg GAlg=$GAlg" >> /home/$USER/createprimary.error.log | 68 | echo "tpm2_createprimary error: Atype=$Atype gAlg=$gAlg GAlg=$GAlg" >> /root/createprimary.error.log |
140 | 69 | STATUS=1 | 69 | STATUS=1 |
141 | 70 | fi | 70 | fi |
142 | 71 | done | 71 | done |
143 | diff --git a/bin/test_tpm2_encryptdecrypt.sh b/bin/test_tpm2_encryptdecrypt.sh | |||
144 | index 1d7f4ff..5373595 100755 | |||
145 | --- a/bin/test_tpm2_encryptdecrypt.sh | |||
146 | +++ b/bin/test_tpm2_encryptdecrypt.sh | |||
147 | @@ -35,14 +35,14 @@ alg_primary_key=0x0001 | |||
148 | 35 | alg_create_obj=0x000B | 35 | alg_create_obj=0x000B |
149 | 36 | alg_create_key=0x0025 | 36 | alg_create_key=0x0025 |
150 | 37 | 37 | ||
159 | 38 | file_input_data=/home/$USER/secret.data | 38 | file_input_data=/root/secret.data |
160 | 39 | file_primary_key_ctx=/home/$USER/context.p_"$alg_primary_obj"_"$alg_primary_key" | 39 | file_primary_key_ctx=/root/context.p_"$alg_primary_obj"_"$alg_primary_key" |
161 | 40 | file_en_decrypt_key_pub=/home/$USER/opu_"$alg_create_obj"_"$alg_create_key" | 40 | file_en_decrypt_key_pub=/root/opu_"$alg_create_obj"_"$alg_create_key" |
162 | 41 | file_en_decrypt_key_priv=/home/$USER/opr_"$alg_create_obj"_"$alg_create_key" | 41 | file_en_decrypt_key_priv=/root/opr_"$alg_create_obj"_"$alg_create_key" |
163 | 42 | file_en_decrypt_key_name=/home/$USER/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" | 42 | file_en_decrypt_key_name=/root/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" |
164 | 43 | file_en_decrypt_key_ctx=/home/$USER/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" | 43 | file_en_decrypt_key_ctx=/root/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" |
165 | 44 | file_encrypt_output_data=/home/$USER/encrypt_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" | 44 | file_encrypt_output_data=/root/encrypt_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" |
166 | 45 | file_decrypt_output_data=/home/$USER/decrypt_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" | 45 | file_decrypt_output_data=/root/decrypt_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" |
167 | 46 | 46 | ||
168 | 47 | fail() | 47 | fail() |
169 | 48 | { | 48 | { |
170 | @@ -51,7 +51,7 @@ fail() | |||
171 | 51 | } | 51 | } |
172 | 52 | Pass() | 52 | Pass() |
173 | 53 | { | 53 | { |
175 | 54 | echo ""$1" pass" >>/home/$USER/test_getpubak_pass.log | 54 | echo ""$1" pass" >>/root/test_getpubak_pass.log |
176 | 55 | } | 55 | } |
177 | 56 | 56 | ||
178 | 57 | rm $file_primary_key_ctx $file_en_decrypt_key_pub $file_en_decrypt_key_priv $file_en_decrypt_key_name $file_en_decrypt_key_ctx $file_encrypt_output_data $file_decrypt_output_data -rf | 57 | rm $file_primary_key_ctx $file_en_decrypt_key_pub $file_en_decrypt_key_priv $file_en_decrypt_key_name $file_en_decrypt_key_ctx $file_encrypt_output_data $file_decrypt_output_data -rf |
179 | diff --git a/bin/test_tpm2_evictcontrol.sh b/bin/test_tpm2_evictcontrol.sh | |||
180 | index a35aeb5..d58ba45 100755 | |||
181 | --- a/bin/test_tpm2_evictcontrol.sh | |||
182 | +++ b/bin/test_tpm2_evictcontrol.sh | |||
183 | @@ -30,11 +30,11 @@ | |||
184 | 30 | # THE POSSIBILITY OF SUCH DAMAGE. | 30 | # THE POSSIBILITY OF SUCH DAMAGE. |
185 | 31 | #;**********************************************************************; | 31 | #;**********************************************************************; |
186 | 32 | #!/bin/bash | 32 | #!/bin/bash |
192 | 33 | file_primary_key_ctx=/home/$USER/context.p_B1 | 33 | file_primary_key_ctx=/root/context.p_B1 |
193 | 34 | file_evict_key_pub=/home/$USER/opuB1_B8 | 34 | file_evict_key_pub=/root/opuB1_B8 |
194 | 35 | file_evict_key_priv=/home/$USER/oprB1_B8 | 35 | file_evict_key_priv=/root/oprB1_B8 |
195 | 36 | file_evict_key_ctx=/home/$USER/context_load_out_B1_B8 | 36 | file_evict_key_ctx=/root/context_load_out_B1_B8 |
196 | 37 | file_evict_key_name=/home/$USER/name.load.B1_B8 | 37 | file_evict_key_name=/root/name.load.B1_B8 |
197 | 38 | 38 | ||
198 | 39 | persistentHandle=0x81010003 | 39 | persistentHandle=0x81010003 |
199 | 40 | 40 | ||
200 | diff --git a/bin/test_tpm2_getpubak.sh b/bin/test_tpm2_getpubak.sh | |||
201 | index 618173e..139473f 100755 | |||
202 | --- a/bin/test_tpm2_getpubak.sh | |||
203 | +++ b/bin/test_tpm2_getpubak.sh | |||
204 | @@ -36,9 +36,9 @@ ek_alg=0x001 | |||
205 | 36 | ak_alg=0x0001 | 36 | ak_alg=0x0001 |
206 | 37 | digestAlg=0x000B | 37 | digestAlg=0x000B |
207 | 38 | signAlg=0x0014 | 38 | signAlg=0x0014 |
211 | 39 | output_ek_pub=/home/$USER/ek_pub.out | 39 | output_ek_pub=/root/ek_pub.out |
212 | 40 | output_ak_pub=/home/$USER/ak_pub.out | 40 | output_ak_pub=/root/ak_pub.out |
213 | 41 | output_ak_pub_name=/home/$USER/ak_name_pub.out | 41 | output_ak_pub_name=/root/ak_name_pub.out |
214 | 42 | 42 | ||
215 | 43 | rm $output_ek_pub $output_ak_pub $output_ak_pub_name -rf | 43 | rm $output_ek_pub $output_ak_pub $output_ak_pub_name -rf |
216 | 44 | 44 | ||
217 | diff --git a/bin/test_tpm2_getpubek.sh b/bin/test_tpm2_getpubek.sh | |||
218 | index 1025578..ad8eaf0 100755 | |||
219 | --- a/bin/test_tpm2_getpubek.sh | |||
220 | +++ b/bin/test_tpm2_getpubek.sh | |||
221 | @@ -32,7 +32,7 @@ | |||
222 | 32 | #!/bin/bash | 32 | #!/bin/bash |
223 | 33 | handle_ek=0x81010005 | 33 | handle_ek=0x81010005 |
224 | 34 | ek_alg=0x001 | 34 | ek_alg=0x001 |
226 | 35 | output_ek_pub=/home/$USER/ek_pub.out | 35 | output_ek_pub=/root/ek_pub.out |
227 | 36 | 36 | ||
228 | 37 | rm -f $output_ek_pub | 37 | rm -f $output_ek_pub |
229 | 38 | 38 | ||
230 | diff --git a/bin/test_tpm2_getrandom.sh b/bin/test_tpm2_getrandom.sh | |||
231 | index 826162a..7b50ec7 100755 | |||
232 | --- a/bin/test_tpm2_getrandom.sh | |||
233 | +++ b/bin/test_tpm2_getrandom.sh | |||
234 | @@ -33,9 +33,9 @@ | |||
235 | 33 | 33 | ||
236 | 34 | size=32 | 34 | size=32 |
237 | 35 | 35 | ||
239 | 36 | rm -f /home/$USER/random.out | 36 | rm -f /root/random.out |
240 | 37 | 37 | ||
242 | 38 | tpm2_getrandom -s 32 -o /home/$USER/random.out | 38 | tpm2_getrandom -s 32 -o /root/random.out |
243 | 39 | if [ $? != 0 ];then | 39 | if [ $? != 0 ];then |
244 | 40 | echo "getrandom test fail, please check the environment or parameters!" | 40 | echo "getrandom test fail, please check the environment or parameters!" |
245 | 41 | exit 1 | 41 | exit 1 |
246 | diff --git a/bin/test_tpm2_getrandom_func.sh b/bin/test_tpm2_getrandom_func.sh | |||
247 | index 2182ea8..e431e86 100755 | |||
248 | --- a/bin/test_tpm2_getrandom_func.sh | |||
249 | +++ b/bin/test_tpm2_getrandom_func.sh | |||
250 | @@ -32,7 +32,7 @@ | |||
251 | 32 | #!/bin/sh | 32 | #!/bin/sh |
252 | 33 | #this script for tpm2_getrandom verification | 33 | #this script for tpm2_getrandom verification |
253 | 34 | 34 | ||
255 | 35 | LOG_FILE=/home/$USER/random_pass_count.log | 35 | LOG_FILE=/root/random_pass_count.log |
256 | 36 | if [ -e "$LOG_FILE" ];then | 36 | if [ -e "$LOG_FILE" ];then |
257 | 37 | rm -f "$LOG_FILE" | 37 | rm -f "$LOG_FILE" |
258 | 38 | fi | 38 | fi |
259 | @@ -40,7 +40,7 @@ i= | |||
260 | 40 | 40 | ||
261 | 41 | #for((i=1;i<=10;i++)); do | 41 | #for((i=1;i<=10;i++)); do |
262 | 42 | for i in `seq 100`; do | 42 | for i in `seq 100`; do |
264 | 43 | tpm2_getrandom -s 32 -o /home/$USER/random_"$i".out | 43 | tpm2_getrandom -s 32 -o /root/random_"$i".out |
265 | 44 | if [ $? != 0 ];then | 44 | if [ $? != 0 ];then |
266 | 45 | echo " create random_"$i".out fail, please check the environment or parameters!" | 45 | echo " create random_"$i".out fail, please check the environment or parameters!" |
267 | 46 | exit 2 | 46 | exit 2 |
268 | diff --git a/bin/test_tpm2_hash.sh b/bin/test_tpm2_hash.sh | |||
269 | index 11cc26c..5b24b0b 100755 | |||
270 | --- a/bin/test_tpm2_hash.sh | |||
271 | +++ b/bin/test_tpm2_hash.sh | |||
272 | @@ -35,14 +35,14 @@ | |||
273 | 35 | halg=0x000B | 35 | halg=0x000B |
274 | 36 | Hierarchy=e | 36 | Hierarchy=e |
275 | 37 | 37 | ||
277 | 38 | rm -f /home/$USER/hash_out_"$Hierarchy"_"$halg" /home/$USER/hash_tk_"$Hierarchy"_"$halg" | 38 | rm -f /root/hash_out_"$Hierarchy"_"$halg" /root/hash_tk_"$Hierarchy"_"$halg" |
278 | 39 | 39 | ||
281 | 40 | if [ ! -f /home/$USER/hash.in ];then | 40 | if [ ! -f /root/hash.in ];then |
282 | 41 | echo "T0naX0u123abc" >/home/$USER/hash.in | 41 | echo "T0naX0u123abc" >/root/hash.in |
283 | 42 | fi | 42 | fi |
284 | 43 | 43 | ||
285 | 44 | 44 | ||
287 | 45 | tpm2_hash -H $Hierarchy -g $halg -I /home/$USER/hash.in -o /home/$USER/hash_out_"$Hierarchy"_"$halg" -t /home/$USER/hash_tk_"$Hierarchy"_"$halg" | 45 | tpm2_hash -H $Hierarchy -g $halg -I /root/hash.in -o /root/hash_out_"$Hierarchy"_"$halg" -t /root/hash_tk_"$Hierarchy"_"$halg" |
288 | 46 | if [ $? != 0 ];then | 46 | if [ $? != 0 ];then |
289 | 47 | echo "hash forHierarchy:"$Hierarchy"halg:"$halg" fail, please check the environment or parameters!" | 47 | echo "hash forHierarchy:"$Hierarchy"halg:"$halg" fail, please check the environment or parameters!" |
290 | 48 | exit 1 | 48 | exit 1 |
291 | diff --git a/bin/test_tpm2_hmac.sh b/bin/test_tpm2_hmac.sh | |||
292 | index a0b5000..e668bd9 100755 | |||
293 | --- a/bin/test_tpm2_hmac.sh | |||
294 | +++ b/bin/test_tpm2_hmac.sh | |||
295 | @@ -38,14 +38,14 @@ halg=0x000B | |||
296 | 38 | 38 | ||
297 | 39 | handle_hmac_key=0x81010013 | 39 | handle_hmac_key=0x81010013 |
298 | 40 | 40 | ||
305 | 41 | file_primary_key_ctx=/home/$USER/context.p_"$alg_primary_obj"_"$alg_primary_key" | 41 | file_primary_key_ctx=/root/context.p_"$alg_primary_obj"_"$alg_primary_key" |
306 | 42 | file_hmac_key_pub=/home/$USER/opu_"$alg_create_obj"_"$alg_create_key" | 42 | file_hmac_key_pub=/root/opu_"$alg_create_obj"_"$alg_create_key" |
307 | 43 | file_hmac_key_priv=/home/$USER/opr_"$alg_create_obj"_"$alg_create_key" | 43 | file_hmac_key_priv=/root/opr_"$alg_create_obj"_"$alg_create_key" |
308 | 44 | file_hmac_key_name=/home/$USER/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" | 44 | file_hmac_key_name=/root/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" |
309 | 45 | file_hmac_key_ctx=/home/$USER/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" | 45 | file_hmac_key_ctx=/root/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" |
310 | 46 | file_hmac_output=/home/$USER/hmac_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" | 46 | file_hmac_output=/root/hmac_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" |
311 | 47 | 47 | ||
313 | 48 | file_input_data=/home/$USER/secret.data | 48 | file_input_data=/root/secret.data |
314 | 49 | 49 | ||
315 | 50 | fail() | 50 | fail() |
316 | 51 | { | 51 | { |
317 | @@ -54,7 +54,7 @@ fail() | |||
318 | 54 | } | 54 | } |
319 | 55 | Pass() | 55 | Pass() |
320 | 56 | { | 56 | { |
322 | 57 | echo ""$1" pass" >>/home/$USER/test_getpubak_pass.log | 57 | echo ""$1" pass" >>/root/test_getpubak_pass.log |
323 | 58 | } | 58 | } |
324 | 59 | 59 | ||
325 | 60 | rm $file_primary_key_ctx $file_hmac_key_pub $file_hmac_key_priv $file_hmac_key_name $file_hmac_key_ctx $file_hmac_output -rf | 60 | rm $file_primary_key_ctx $file_hmac_key_pub $file_hmac_key_priv $file_hmac_key_name $file_hmac_key_ctx $file_hmac_output -rf |
326 | @@ -87,9 +87,9 @@ fi | |||
327 | 87 | 87 | ||
328 | 88 | ####handle test | 88 | ####handle test |
329 | 89 | rm -f $file_hmac_output | 89 | rm -f $file_hmac_output |
331 | 90 | tpm2_evictcontrol -A o -c $file_hmac_key_ctx -S $handle_hmac_key |tee /home/$USER/evict.log | 90 | tpm2_evictcontrol -A o -c $file_hmac_key_ctx -S $handle_hmac_key |tee /root/evict.log |
332 | 91 | c1="$?" | 91 | c1="$?" |
334 | 92 | grep "persistentHandle: "$handle_hmac_key"" /home/$USER/evict.log | 92 | grep "persistentHandle: "$handle_hmac_key"" /root/evict.log |
335 | 93 | c2="$?" | 93 | c2="$?" |
336 | 94 | 94 | ||
337 | 95 | if [ $c1 != 0 ] || [ $c2 != 0 ];then | 95 | if [ $c1 != 0 ] || [ $c2 != 0 ];then |
338 | diff --git a/bin/test_tpm2_listpcrs.sh b/bin/test_tpm2_listpcrs.sh | |||
339 | index 3fac1cf..beaa55d 100755 | |||
340 | --- a/bin/test_tpm2_listpcrs.sh | |||
341 | +++ b/bin/test_tpm2_listpcrs.sh | |||
342 | @@ -46,9 +46,9 @@ if [ $? != 0 ];then | |||
343 | 46 | exit 1 | 46 | exit 1 |
344 | 47 | fi | 47 | fi |
345 | 48 | 48 | ||
347 | 49 | rm -rf /home/$USER/pcrs | 49 | rm -rf /root/pcrs |
348 | 50 | 50 | ||
350 | 51 | tpm2_listpcrs -L 0x04:17,18,19+0x0b:0,17,18,19 -o /home/$USER/pcrs | 51 | tpm2_listpcrs -L 0x04:17,18,19+0x0b:0,17,18,19 -o /root/pcrs |
351 | 52 | 52 | ||
352 | 53 | if [ $? != 0 ];then | 53 | if [ $? != 0 ];then |
353 | 54 | echo "listpcrs fail!" | 54 | echo "listpcrs fail!" |
354 | diff --git a/bin/test_tpm2_load.sh b/bin/test_tpm2_load.sh | |||
355 | index e348d79..297a980 100755 | |||
356 | --- a/bin/test_tpm2_load.sh | |||
357 | +++ b/bin/test_tpm2_load.sh | |||
358 | @@ -37,12 +37,12 @@ alg_create_key=0x0008 | |||
359 | 37 | 37 | ||
360 | 38 | alg_load=0x0004 | 38 | alg_load=0x0004 |
361 | 39 | 39 | ||
368 | 40 | file_primary_key_ctx=/home/$USER/context.p_"$alg_primary_obj"_"$alg_primary_key" | 40 | file_primary_key_ctx=/root/context.p_"$alg_primary_obj"_"$alg_primary_key" |
369 | 41 | file_load_key_pub=/home/$USER/opu_"$alg_create_obj"_"$alg_create_key" | 41 | file_load_key_pub=/root/opu_"$alg_create_obj"_"$alg_create_key" |
370 | 42 | file_load_key_priv=/home/$USER/opr_"$alg_create_obj"_"$alg_create_key" | 42 | file_load_key_priv=/root/opr_"$alg_create_obj"_"$alg_create_key" |
371 | 43 | file_load_key_name=/home/$USER/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" | 43 | file_load_key_name=/root/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" |
372 | 44 | file_load_key_ctx=/home/$USER/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" | 44 | file_load_key_ctx=/root/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" |
373 | 45 | file_load_output=/home/$USER/load_"$file_load_key_ctx" | 45 | file_load_output=/root/load_"$file_load_key_ctx" |
374 | 46 | 46 | ||
375 | 47 | Handle_parent=0x81010018 | 47 | Handle_parent=0x81010018 |
376 | 48 | Handle_ek_load=0x81010017 | 48 | Handle_ek_load=0x81010017 |
377 | @@ -55,7 +55,7 @@ fail() | |||
378 | 55 | } | 55 | } |
379 | 56 | Pass() | 56 | Pass() |
380 | 57 | { | 57 | { |
382 | 58 | echo ""$1" pass" >>/home/$USER/test_getpubak_pass.log | 58 | echo ""$1" pass" >>/root/test_getpubak_pass.log |
383 | 59 | } | 59 | } |
384 | 60 | 60 | ||
385 | 61 | rm $file_primary_key_ctx $file_load_key_pub $file_load_key_priv $file_load_key_name $file_load_key_ctx $file_load_output -rf | 61 | rm $file_primary_key_ctx $file_load_key_pub $file_load_key_priv $file_load_key_name $file_load_key_ctx $file_load_output -rf |
386 | diff --git a/bin/test_tpm2_loadexternal.sh b/bin/test_tpm2_loadexternal.sh | |||
387 | index 60da495..c60f363 100755 | |||
388 | --- a/bin/test_tpm2_loadexternal.sh | |||
389 | +++ b/bin/test_tpm2_loadexternal.sh | |||
390 | @@ -36,12 +36,12 @@ alg_create_obj=0x000B | |||
391 | 36 | alg_create_key=0x0008 | 36 | alg_create_key=0x0008 |
392 | 37 | 37 | ||
393 | 38 | 38 | ||
400 | 39 | file_primary_key_ctx=/home/$USER/context.p_"$alg_primary_obj"_"$alg_primary_key" | 39 | file_primary_key_ctx=/root/context.p_"$alg_primary_obj"_"$alg_primary_key" |
401 | 40 | file_loadexternal_key_pub=/home/$USER/opu_"$alg_create_obj"_"$alg_create_key" | 40 | file_loadexternal_key_pub=/root/opu_"$alg_create_obj"_"$alg_create_key" |
402 | 41 | file_loadexternal_key_priv=/home/$USER/opr_"$alg_create_obj"_"$alg_create_key" | 41 | file_loadexternal_key_priv=/root/opr_"$alg_create_obj"_"$alg_create_key" |
403 | 42 | file_loadexternal_key_name=/home/$USER/name.loadexternal_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" | 42 | file_loadexternal_key_name=/root/name.loadexternal_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" |
404 | 43 | file_loadexternal_key_ctx=/home/$USER/ctx_loadexternal_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" | 43 | file_loadexternal_key_ctx=/root/ctx_loadexternal_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" |
405 | 44 | file_loadexternal_output=/home/$USER/loadexternal_"$file_loadexternal_key_ctx" | 44 | file_loadexternal_output=/root/loadexternal_"$file_loadexternal_key_ctx" |
406 | 45 | 45 | ||
407 | 46 | Handle_parent=0x81010019 | 46 | Handle_parent=0x81010019 |
408 | 47 | 47 | ||
409 | @@ -53,7 +53,7 @@ fail() | |||
410 | 53 | } | 53 | } |
411 | 54 | Pass() | 54 | Pass() |
412 | 55 | { | 55 | { |
414 | 56 | echo ""$1" pass" >>/home/$USER/test_getpubak_pass.log | 56 | echo ""$1" pass" >>/root/test_getpubak_pass.log |
415 | 57 | } | 57 | } |
416 | 58 | 58 | ||
417 | 59 | rm $file_primary_key_ctx $file_loadexternal_key_pub $file_loadexternal_key_priv $file_loadexternal_key_name $file_loadexternal_key_ctx $file_loadexternal_output -rf | 59 | rm $file_primary_key_ctx $file_loadexternal_key_pub $file_loadexternal_key_priv $file_loadexternal_key_name $file_loadexternal_key_ctx $file_loadexternal_output -rf |
418 | diff --git a/bin/test_tpm2_makecredential.sh b/bin/test_tpm2_makecredential.sh | |||
419 | index 741ec4e..04969fd 100755 | |||
420 | --- a/bin/test_tpm2_makecredential.sh | |||
421 | +++ b/bin/test_tpm2_makecredential.sh | |||
422 | @@ -37,11 +37,11 @@ ak_alg=0x0001 | |||
423 | 37 | digestAlg=0x000B | 37 | digestAlg=0x000B |
424 | 38 | signAlg=0x0014 | 38 | signAlg=0x0014 |
425 | 39 | 39 | ||
431 | 40 | file_input_data=/home/$USER/secret.data | 40 | file_input_data=/root/secret.data |
432 | 41 | output_ek_pub=/home/$USER/ek_pub.out | 41 | output_ek_pub=/root/ek_pub.out |
433 | 42 | output_ak_pub=/home/$USER/ak_pub.out | 42 | output_ak_pub=/root/ak_pub.out |
434 | 43 | output_ak_pub_name=/home/$USER/ak_name_pub.out | 43 | output_ak_pub_name=/root/ak_name_pub.out |
435 | 44 | output_mkcredential=/home/$USER/mkcredential.out | 44 | output_mkcredential=/root/mkcredential.out |
436 | 45 | 45 | ||
437 | 46 | rm $output_ek_pub $output_ak_pub $output_ak_pub_name $output_mkcredential -rf | 46 | rm $output_ek_pub $output_ak_pub $output_ak_pub_name $output_mkcredential -rf |
438 | 47 | 47 | ||
439 | @@ -56,14 +56,14 @@ if [ $? != 0 ] || [ ! -e $output_ek_pub ];then | |||
440 | 56 | exit 1 | 56 | exit 1 |
441 | 57 | fi | 57 | fi |
442 | 58 | 58 | ||
444 | 59 | tpm2_getpubak -E $handle_ek -k $handle_ak -g $ak_alg -D $digestAlg -s $signAlg -f $output_ak_pub -n $output_ak_pub_name |tee /home/$USER/output_ak | 59 | tpm2_getpubak -E $handle_ek -k $handle_ak -g $ak_alg -D $digestAlg -s $signAlg -f $output_ak_pub -n $output_ak_pub_name |tee /root/output_ak |
445 | 60 | 60 | ||
447 | 61 | if [ $? != 0 ] || [ ! -e /home/$USER/output_ak ];then | 61 | if [ $? != 0 ] || [ ! -e /root/output_ak ];then |
448 | 62 | echo "getpubak fail, please check the environment or parameters!" | 62 | echo "getpubak fail, please check the environment or parameters!" |
449 | 63 | exit 1 | 63 | exit 1 |
450 | 64 | fi | 64 | fi |
453 | 65 | grep -A 3 "Name of loaded key:" /home/$USER/output_ak|tr "\n" " " >/home/$USER/grep.txt | 65 | grep -A 3 "Name of loaded key:" /root/output_ak|tr "\n" " " >/root/grep.txt |
454 | 66 | Loadkeyname=`sed -e 's/ //g' /home/$USER/grep.txt | awk -F':' '{print $2}'` | 66 | Loadkeyname=`sed -e 's/ //g' /root/grep.txt | awk -F':' '{print $2}'` |
455 | 67 | 67 | ||
456 | 68 | tpm2_makecredential -e $output_ek_pub -s $file_input_data -n $Loadkeyname -o $output_mkcredential | 68 | tpm2_makecredential -e $output_ek_pub -s $file_input_data -n $Loadkeyname -o $output_mkcredential |
457 | 69 | 69 | ||
458 | diff --git a/bin/test_tpm2_nv.sh b/bin/test_tpm2_nv.sh | |||
459 | index 4ee0fbe..636455e 100755 | |||
460 | --- a/bin/test_tpm2_nv.sh | |||
461 | +++ b/bin/test_tpm2_nv.sh | |||
462 | @@ -55,10 +55,10 @@ fi | |||
463 | 55 | 55 | ||
464 | 56 | 56 | ||
465 | 57 | if [ ! -f nv.test_w ];then | 57 | if [ ! -f nv.test_w ];then |
467 | 58 | echo "please123abc" >/home/$USER/nv.test_w | 58 | echo "please123abc" >/root/nv.test_w |
468 | 59 | fi | 59 | fi |
469 | 60 | 60 | ||
471 | 61 | tpm2_nvwrite -x $nv_test_index -a $nv_auth_handle -f /home/$USER/nv.test_w | 61 | tpm2_nvwrite -x $nv_test_index -a $nv_auth_handle -f /root/nv.test_w |
472 | 62 | if [ $? != 0 ];then | 62 | if [ $? != 0 ];then |
473 | 63 | echo "nvwrite fail!" | 63 | echo "nvwrite fail!" |
474 | 64 | exit 1 | 64 | exit 1 |
475 | diff --git a/bin/test_tpm2_readpublic.sh b/bin/test_tpm2_readpublic.sh | |||
476 | index 5281709..2aa56f0 100755 | |||
477 | --- a/bin/test_tpm2_readpublic.sh | |||
478 | +++ b/bin/test_tpm2_readpublic.sh | |||
479 | @@ -35,12 +35,12 @@ alg_primary_key=0x0001 | |||
480 | 35 | alg_create_obj=0x000B | 35 | alg_create_obj=0x000B |
481 | 36 | alg_create_key=0x0008 | 36 | alg_create_key=0x0008 |
482 | 37 | 37 | ||
489 | 38 | file_primary_key_ctx=/home/$USER/context.p_"$alg_primary_obj"_"$alg_primary_key" | 38 | file_primary_key_ctx=/root/context.p_"$alg_primary_obj"_"$alg_primary_key" |
490 | 39 | file_readpub_key_pub=/home/$USER/opu_"$alg_create_obj"_"$alg_create_key" | 39 | file_readpub_key_pub=/root/opu_"$alg_create_obj"_"$alg_create_key" |
491 | 40 | file_readpub_key_priv=/home/$USER/opr_"$alg_create_obj"_"$alg_create_key" | 40 | file_readpub_key_priv=/root/opr_"$alg_create_obj"_"$alg_create_key" |
492 | 41 | file_readpub_key_name=/home/$USER/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" | 41 | file_readpub_key_name=/root/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" |
493 | 42 | file_readpub_key_ctx=/home/$USER/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" | 42 | file_readpub_key_ctx=/root/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" |
494 | 43 | file_readpub_output=/home/$USER/readpub_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" | 43 | file_readpub_output=/root/readpub_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" |
495 | 44 | 44 | ||
496 | 45 | Handle_readpub=0x81010014 | 45 | Handle_readpub=0x81010014 |
497 | 46 | 46 | ||
498 | @@ -51,7 +51,7 @@ fail() | |||
499 | 51 | } | 51 | } |
500 | 52 | Pass() | 52 | Pass() |
501 | 53 | { | 53 | { |
503 | 54 | echo ""$1" pass" >>/home/$USER/test_getpubak_pass.log | 54 | echo ""$1" pass" >>/root/test_getpubak_pass.log |
504 | 55 | } | 55 | } |
505 | 56 | 56 | ||
506 | 57 | rm $file_primary_key_ctx $file_readpub_key_pub $file_readpub_key_priv $file_readpub_key_name $file_readpub_key_ctx $file_readpub_output -rf | 57 | rm $file_primary_key_ctx $file_readpub_key_pub $file_readpub_key_priv $file_readpub_key_name $file_readpub_key_ctx $file_readpub_output -rf |
507 | diff --git a/bin/test_tpm2_rsadecrypt.sh b/bin/test_tpm2_rsadecrypt.sh | |||
508 | index 156c703..7cf7797 100755 | |||
509 | --- a/bin/test_tpm2_rsadecrypt.sh | |||
510 | +++ b/bin/test_tpm2_rsadecrypt.sh | |||
511 | @@ -30,16 +30,16 @@ | |||
512 | 30 | # THE POSSIBILITY OF SUCH DAMAGE. | 30 | # THE POSSIBILITY OF SUCH DAMAGE. |
513 | 31 | #;**********************************************************************; | 31 | #;**********************************************************************; |
514 | 32 | #!/bin/bash | 32 | #!/bin/bash |
521 | 33 | file_primary_key_ctx=/home/$USER/context.p_B1 | 33 | file_primary_key_ctx=/root/context.p_B1 |
522 | 34 | file_rsaencrypt_key_pub=/home/$USER/opuB1_B8 | 34 | file_rsaencrypt_key_pub=/root/opuB1_B8 |
523 | 35 | file_rsaencrypt_key_priv=/home/$USER/oprB1_B8 | 35 | file_rsaencrypt_key_priv=/root/oprB1_B8 |
524 | 36 | file_rsaencrypt_key_ctx=/home/$USER/context_loadext_out_B1_B8 | 36 | file_rsaencrypt_key_ctx=/root/context_loadext_out_B1_B8 |
525 | 37 | file_rsadecrypt_key_ctx=/home/$USER/context_load_out_B1_B8 | 37 | file_rsadecrypt_key_ctx=/root/context_load_out_B1_B8 |
526 | 38 | file_rsaencrypt_key_name=/home/$USER/name.load.B1_B8 | 38 | file_rsaencrypt_key_name=/root/name.load.B1_B8 |
527 | 39 | 39 | ||
531 | 40 | file_rsa_en_output_data=/home/$USER/rsa_en.out | 40 | file_rsa_en_output_data=/root/rsa_en.out |
532 | 41 | file_rsa_de_output_data=/home/$USER/rsa_de.out | 41 | file_rsa_de_output_data=/root/rsa_de.out |
533 | 42 | file_input_data=/home/$USER/secret.data | 42 | file_input_data=/root/secret.data |
534 | 43 | 43 | ||
535 | 44 | alg_hash=0x000B | 44 | alg_hash=0x000B |
536 | 45 | alg_primary_key=0x0001 | 45 | alg_primary_key=0x0001 |
537 | diff --git a/bin/test_tpm2_rsaencrypt.sh b/bin/test_tpm2_rsaencrypt.sh | |||
538 | index 0edb6a9..0b560b2 100755 | |||
539 | --- a/bin/test_tpm2_rsaencrypt.sh | |||
540 | +++ b/bin/test_tpm2_rsaencrypt.sh | |||
541 | @@ -30,14 +30,14 @@ | |||
542 | 30 | # THE POSSIBILITY OF SUCH DAMAGE. | 30 | # THE POSSIBILITY OF SUCH DAMAGE. |
543 | 31 | #;**********************************************************************; | 31 | #;**********************************************************************; |
544 | 32 | #!/bin/bash | 32 | #!/bin/bash |
550 | 33 | file_primary_key_ctx=/home/$USER/context.p_B1 | 33 | file_primary_key_ctx=/root/context.p_B1 |
551 | 34 | file_rsaencrypt_key_pub=/home/$USER/opuB1_B8 | 34 | file_rsaencrypt_key_pub=/root/opuB1_B8 |
552 | 35 | file_rsaencrypt_key_priv=/home/$USER/oprB1_B8 | 35 | file_rsaencrypt_key_priv=/root/oprB1_B8 |
553 | 36 | file_rsaencrypt_key_ctx=/home/$USER/context_load_out_B1_B8 | 36 | file_rsaencrypt_key_ctx=/root/context_load_out_B1_B8 |
554 | 37 | file_rsaencrypt_key_name=/home/$USER/name.load.B1_B8 | 37 | file_rsaencrypt_key_name=/root/name.load.B1_B8 |
555 | 38 | 38 | ||
558 | 39 | file_rsa_en_output_data=/home/$USER/rsa_en.out | 39 | file_rsa_en_output_data=/root/rsa_en.out |
559 | 40 | file_input_data=/home/$USER/secret.data | 40 | file_input_data=/root/secret.data |
560 | 41 | 41 | ||
561 | 42 | alg_hash=0x000B | 42 | alg_hash=0x000B |
562 | 43 | alg_primary_key=0x0001 | 43 | alg_primary_key=0x0001 |
563 | diff --git a/bin/test_tpm2_sign.sh b/bin/test_tpm2_sign.sh | |||
564 | index 1c6f431..8e23645 100755 | |||
565 | --- a/bin/test_tpm2_sign.sh | |||
566 | +++ b/bin/test_tpm2_sign.sh | |||
567 | @@ -31,13 +31,13 @@ | |||
568 | 31 | #;**********************************************************************; | 31 | #;**********************************************************************; |
569 | 32 | #!/bin/bash | 32 | #!/bin/bash |
570 | 33 | 33 | ||
578 | 34 | file_primary_key_ctx=/home/$USER/context.p_B1 | 34 | file_primary_key_ctx=/root/context.p_B1 |
579 | 35 | file_signing_key_pub=/home/$USER/opuB1_B8 | 35 | file_signing_key_pub=/root/opuB1_B8 |
580 | 36 | file_signing_key_priv=/home/$USER/oprB1_B8 | 36 | file_signing_key_priv=/root/oprB1_B8 |
581 | 37 | file_signing_key_ctx=/home/$USER/context_load_out_B1_B8 | 37 | file_signing_key_ctx=/root/context_load_out_B1_B8 |
582 | 38 | file_signing_key_name=/home/$USER/name.load.B1_B8 | 38 | file_signing_key_name=/root/name.load.B1_B8 |
583 | 39 | file_input_data=/home/$USER/secret.data | 39 | file_input_data=/root/secret.data |
584 | 40 | file_output_data=/home/$USER/sig.4 | 40 | file_output_data=/root/sig.4 |
585 | 41 | 41 | ||
586 | 42 | 42 | ||
587 | 43 | handle_signing_key=0x81010005 | 43 | handle_signing_key=0x81010005 |
588 | @@ -53,7 +53,7 @@ fail() | |||
589 | 53 | } | 53 | } |
590 | 54 | Pass() | 54 | Pass() |
591 | 55 | { | 55 | { |
593 | 56 | echo ""$1" pass" >>/home/$USER/test_getpubak_pass.log | 56 | echo ""$1" pass" >>/root/test_getpubak_pass.log |
594 | 57 | } | 57 | } |
595 | 58 | 58 | ||
596 | 59 | 59 | ||
597 | @@ -85,9 +85,9 @@ else | |||
598 | 85 | rm $file_output_data -rf | 85 | rm $file_output_data -rf |
599 | 86 | fi | 86 | fi |
600 | 87 | 87 | ||
602 | 88 | tpm2_evictcontrol -A o -c $file_signing_key_ctx -S $handle_signing_key |tee /home/$USER/evict.log | 88 | tpm2_evictcontrol -A o -c $file_signing_key_ctx -S $handle_signing_key |tee /root/evict.log |
603 | 89 | c1="$?" | 89 | c1="$?" |
605 | 90 | grep "persistentHandle: "$handle_signing_key"" /home/$USER/evict.log | 90 | grep "persistentHandle: "$handle_signing_key"" /root/evict.log |
606 | 91 | c2="$?" | 91 | c2="$?" |
607 | 92 | 92 | ||
608 | 93 | if [ $c1 != 0 ] || [ $c2 != 0 ];then | 93 | if [ $c1 != 0 ] || [ $c2 != 0 ];then |
609 | diff --git a/bin/test_tpm2_unseal.sh b/bin/test_tpm2_unseal.sh | |||
610 | index d66ef8d..9fec84e 100755 | |||
611 | --- a/bin/test_tpm2_unseal.sh | |||
612 | +++ b/bin/test_tpm2_unseal.sh | |||
613 | @@ -35,13 +35,13 @@ alg_primary_key=0x0001 | |||
614 | 35 | alg_create_obj=0x000B | 35 | alg_create_obj=0x000B |
615 | 36 | alg_create_key=0x0008 | 36 | alg_create_key=0x0008 |
616 | 37 | 37 | ||
624 | 38 | file_input_data=/home/$USER/secret.data | 38 | file_input_data=/root/secret.data |
625 | 39 | file_primary_key_ctx=/home/$USER/context.p_"$alg_primary_obj"_"$alg_primary_key" | 39 | file_primary_key_ctx=/root/context.p_"$alg_primary_obj"_"$alg_primary_key" |
626 | 40 | file_unseal_key_pub=/home/$USER/opu_"$alg_create_obj"_"$alg_create_key" | 40 | file_unseal_key_pub=/root/opu_"$alg_create_obj"_"$alg_create_key" |
627 | 41 | file_unseal_key_priv=/home/$USER/opr_"$alg_create_obj"_"$alg_create_key" | 41 | file_unseal_key_priv=/root/opr_"$alg_create_obj"_"$alg_create_key" |
628 | 42 | file_unseal_key_ctx=/home/$USER/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" | 42 | file_unseal_key_ctx=/root/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" |
629 | 43 | file_unseal_key_name=/home/$USER/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" | 43 | file_unseal_key_name=/root/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" |
630 | 44 | file_unseal_output_data=/home/$USER/usl_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" | 44 | file_unseal_output_data=/root/usl_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key" |
631 | 45 | 45 | ||
632 | 46 | rm $file_primary_key_ctx $file_unseal_key_pub $file_unseal_key_priv $file_unseal_key_ctx $file_unseal_key_name $file_unseal_output_data -rf | 46 | rm $file_primary_key_ctx $file_unseal_key_pub $file_unseal_key_priv $file_unseal_key_ctx $file_unseal_key_name $file_unseal_output_data -rf |
633 | 47 | 47 | ||
634 | diff --git a/bin/test_tpm2_verifysignature.sh b/bin/test_tpm2_verifysignature.sh | |||
635 | index 6078971..e173f53 100755 | |||
636 | --- a/bin/test_tpm2_verifysignature.sh | |||
637 | +++ b/bin/test_tpm2_verifysignature.sh | |||
638 | @@ -30,17 +30,17 @@ | |||
639 | 30 | # THE POSSIBILITY OF SUCH DAMAGE. | 30 | # THE POSSIBILITY OF SUCH DAMAGE. |
640 | 31 | #;**********************************************************************; | 31 | #;**********************************************************************; |
641 | 32 | #!/bin/bash | 32 | #!/bin/bash |
653 | 33 | file_primary_key_ctx=/home/$USER/context.p_B1 | 33 | file_primary_key_ctx=/root/context.p_B1 |
654 | 34 | file_signing_key_pub=/home/$USER/opuB1_B8 | 34 | file_signing_key_pub=/root/opuB1_B8 |
655 | 35 | file_signing_key_priv=/home/$USER/oprB1_B8 | 35 | file_signing_key_priv=/root/oprB1_B8 |
656 | 36 | file_signing_key_ctx=/home/$USER/context_load_out_B1_B8 | 36 | file_signing_key_ctx=/root/context_load_out_B1_B8 |
657 | 37 | file_signing_key_name=/home/$USER/name.load.B1_B8 | 37 | file_signing_key_name=/root/name.load.B1_B8 |
658 | 38 | file_input_data=/home/$USER/secret.data | 38 | file_input_data=/root/secret.data |
659 | 39 | file_output_data=/home/$USER/sig.4 | 39 | file_output_data=/root/sig.4 |
660 | 40 | file_verify_tk_data=/home/$USER/tickt_verify_sig.4 | 40 | file_verify_tk_data=/root/tickt_verify_sig.4 |
661 | 41 | 41 | ||
662 | 42 | file_input_data_hash=/home/$USER/secret_hash.data | 42 | file_input_data_hash=/root/secret_hash.data |
663 | 43 | file_input_data_hash_tk=/home/$USER/secret_hash_tk.data | 43 | file_input_data_hash_tk=/root/secret_hash_tk.data |
664 | 44 | 44 | ||
665 | 45 | handle_signing_key=0x81010005 | 45 | handle_signing_key=0x81010005 |
666 | 46 | 46 | ||
667 | @@ -55,7 +55,7 @@ fail() | |||
668 | 55 | } | 55 | } |
669 | 56 | Pass() | 56 | Pass() |
670 | 57 | { | 57 | { |
672 | 58 | echo ""$1" pass" >>/home/$USER/test_getpubak_pass.log | 58 | echo ""$1" pass" >>/root/test_getpubak_pass.log |
673 | 59 | } | 59 | } |
674 | 60 | 60 | ||
675 | 61 | 61 | ||
676 | diff --git a/units/tpm2_1.1.pxu b/units/tpm2_1.1.pxu | |||
677 | index 67a2947..d875f09 100644 | |||
678 | --- a/units/tpm2_1.1.pxu | |||
679 | +++ b/units/tpm2_1.1.pxu | |||
680 | @@ -41,6 +41,7 @@ category_id: tpm2 | |||
681 | 41 | depends: tpm2.0/init-resource-mgr | 41 | depends: tpm2.0/init-resource-mgr |
682 | 42 | estimated_duration: 2 | 42 | estimated_duration: 2 |
683 | 43 | plugin: shell | 43 | plugin: shell |
684 | 44 | user: root | ||
685 | 44 | _summary: tpm2_takeownership | 45 | _summary: tpm2_takeownership |
686 | 45 | command: test_tpm2_takeownership_all.sh | 46 | command: test_tpm2_takeownership_all.sh |
687 | 46 | flags: preserve-cwd | 47 | flags: preserve-cwd |
688 | @@ -50,6 +51,7 @@ category_id: tpm2 | |||
689 | 50 | depends: tpm2.0/tpm2_takeownership | 51 | depends: tpm2.0/tpm2_takeownership |
690 | 51 | estimated_duration: 2 | 52 | estimated_duration: 2 |
691 | 52 | plugin: shell | 53 | plugin: shell |
692 | 54 | user: root | ||
693 | 53 | _summary: tpm2_createprimary | 55 | _summary: tpm2_createprimary |
694 | 54 | command: test_tpm2_createprimary_all.sh | 56 | command: test_tpm2_createprimary_all.sh |
695 | 55 | flags: preserve-cwd | 57 | flags: preserve-cwd |
696 | @@ -59,6 +61,7 @@ category_id: tpm2 | |||
697 | 59 | depends: tpm2.0/tpm2_createprimary_all | 61 | depends: tpm2.0/tpm2_createprimary_all |
698 | 60 | estimated_duration: 2 | 62 | estimated_duration: 2 |
699 | 61 | plugin: shell | 63 | plugin: shell |
700 | 64 | user: root | ||
701 | 62 | _summary: tpm2_create | 65 | _summary: tpm2_create |
702 | 63 | command: test_tpm2_create_all.sh | 66 | command: test_tpm2_create_all.sh |
703 | 64 | flags: preserve-cwd | 67 | flags: preserve-cwd |
704 | @@ -68,6 +71,7 @@ category_id: tpm2 | |||
705 | 68 | depends: tpm2.0/tpm2_takeownership | 71 | depends: tpm2.0/tpm2_takeownership |
706 | 69 | estimated_duration: 2 | 72 | estimated_duration: 2 |
707 | 70 | plugin: shell | 73 | plugin: shell |
708 | 74 | user: root | ||
709 | 71 | _summary: tpm2 NV tools | 75 | _summary: tpm2 NV tools |
710 | 72 | command: test_tpm2_nv.sh | 76 | command: test_tpm2_nv.sh |
711 | 73 | flags: preserve-cwd | 77 | flags: preserve-cwd |
712 | @@ -77,6 +81,7 @@ category_id: tpm2 | |||
713 | 77 | depends: tpm2.0/tpm2_takeownership | 81 | depends: tpm2.0/tpm2_takeownership |
714 | 78 | estimated_duration: 15 | 82 | estimated_duration: 15 |
715 | 79 | plugin: shell | 83 | plugin: shell |
716 | 84 | user: root | ||
717 | 80 | _summary: tpm2_listpcrs | 85 | _summary: tpm2_listpcrs |
718 | 81 | command: test_tpm2_listpcrs.sh | 86 | command: test_tpm2_listpcrs.sh |
719 | 82 | flags: preserve-cwd | 87 | flags: preserve-cwd |
720 | @@ -86,6 +91,7 @@ category_id: tpm2 | |||
721 | 86 | depends: tpm2.0/tpm2_takeownership | 91 | depends: tpm2.0/tpm2_takeownership |
722 | 87 | estimated_duration: 2 | 92 | estimated_duration: 2 |
723 | 88 | plugin: shell | 93 | plugin: shell |
724 | 94 | user: root | ||
725 | 89 | _summary: tpm2_getrandom | 95 | _summary: tpm2_getrandom |
726 | 90 | command: test_tpm2_getrandom.sh | 96 | command: test_tpm2_getrandom.sh |
727 | 91 | flags: preserve-cwd | 97 | flags: preserve-cwd |
728 | @@ -95,6 +101,7 @@ category_id: tpm2 | |||
729 | 95 | depends: tpm2.0/tpm2_takeownership | 101 | depends: tpm2.0/tpm2_takeownership |
730 | 96 | estimated_duration: 20 | 102 | estimated_duration: 20 |
731 | 97 | plugin: shell | 103 | plugin: shell |
732 | 104 | user: root | ||
733 | 98 | _summary: tpm2_load | 105 | _summary: tpm2_load |
734 | 99 | command: test_tpm2_load.sh | 106 | command: test_tpm2_load.sh |
735 | 100 | flags: preserve-cwd | 107 | flags: preserve-cwd |
736 | @@ -104,6 +111,7 @@ category_id: tpm2 | |||
737 | 104 | depends: tpm2.0/tpm2_takeownership | 111 | depends: tpm2.0/tpm2_takeownership |
738 | 105 | estimated_duration: 20 | 112 | estimated_duration: 20 |
739 | 106 | plugin: shell | 113 | plugin: shell |
740 | 114 | user: root | ||
741 | 107 | _summary: tpm2_loadexternal | 115 | _summary: tpm2_loadexternal |
742 | 108 | command: test_tpm2_loadexternal.sh | 116 | command: test_tpm2_loadexternal.sh |
743 | 109 | flags: preserve-cwd | 117 | flags: preserve-cwd |
744 | @@ -113,6 +121,7 @@ category_id: tpm2 | |||
745 | 113 | depends: tpm2.0/tpm2_takeownership | 121 | depends: tpm2.0/tpm2_takeownership |
746 | 114 | estimated_duration: 20 | 122 | estimated_duration: 20 |
747 | 115 | plugin: shell | 123 | plugin: shell |
748 | 124 | user: root | ||
749 | 116 | _summary: tpm2_evictcontrol | 125 | _summary: tpm2_evictcontrol |
750 | 117 | command: test_tpm2_evictcontrol.sh | 126 | command: test_tpm2_evictcontrol.sh |
751 | 118 | flags: preserve-cwd | 127 | flags: preserve-cwd |
752 | @@ -122,6 +131,7 @@ category_id: tpm2 | |||
753 | 122 | depends: tpm2.0/tpm2_takeownership | 131 | depends: tpm2.0/tpm2_takeownership |
754 | 123 | estimated_duration: 20 | 132 | estimated_duration: 20 |
755 | 124 | plugin: shell | 133 | plugin: shell |
756 | 134 | user: root | ||
757 | 125 | _summary: tpm2_hash | 135 | _summary: tpm2_hash |
758 | 126 | command: test_tpm2_hash.sh | 136 | command: test_tpm2_hash.sh |
759 | 127 | flags: preserve-cwd | 137 | flags: preserve-cwd |
760 | @@ -131,6 +141,7 @@ category_id: tpm2 | |||
761 | 131 | depends: tpm2.0/tpm2_takeownership | 141 | depends: tpm2.0/tpm2_takeownership |
762 | 132 | estimated_duration: 10 | 142 | estimated_duration: 10 |
763 | 133 | plugin: shell | 143 | plugin: shell |
764 | 144 | user: root | ||
765 | 134 | _summary: tpm2_hmac | 145 | _summary: tpm2_hmac |
766 | 135 | command: test_tpm2_hmac.sh | 146 | command: test_tpm2_hmac.sh |
767 | 136 | flags: preserve-cwd | 147 | flags: preserve-cwd |
768 | @@ -140,6 +151,7 @@ category_id: tpm2 | |||
769 | 140 | depends: tpm2.0/tpm2_takeownership | 151 | depends: tpm2.0/tpm2_takeownership |
770 | 141 | estimated_duration: 10 | 152 | estimated_duration: 10 |
771 | 142 | plugin: shell | 153 | plugin: shell |
772 | 154 | user: root | ||
773 | 143 | _summary: tpm2_quote | 155 | _summary: tpm2_quote |
774 | 144 | command: test_tpm2_quote.sh | 156 | command: test_tpm2_quote.sh |
775 | 145 | flags: preserve-cwd | 157 | flags: preserve-cwd |
776 | @@ -149,6 +161,7 @@ category_id: tpm2 | |||
777 | 149 | depends: tpm2.0/tpm2_takeownership | 161 | depends: tpm2.0/tpm2_takeownership |
778 | 150 | estimated_duration: 20 | 162 | estimated_duration: 20 |
779 | 151 | plugin: shell | 163 | plugin: shell |
780 | 164 | user: root | ||
781 | 152 | _summary: tpm2_unseal | 165 | _summary: tpm2_unseal |
782 | 153 | command: test_tpm2_unseal.sh | 166 | command: test_tpm2_unseal.sh |
783 | 154 | flags: preserve-cwd | 167 | flags: preserve-cwd |
784 | @@ -158,6 +171,7 @@ category_id: tpm2 | |||
785 | 158 | depends: tpm2.0/tpm2_takeownership | 171 | depends: tpm2.0/tpm2_takeownership |
786 | 159 | estimated_duration: 20 | 172 | estimated_duration: 20 |
787 | 160 | plugin: shell | 173 | plugin: shell |
788 | 174 | user: root | ||
789 | 161 | _summary: tpm2_akparse | 175 | _summary: tpm2_akparse |
790 | 162 | command: test_tpm2_akparse.sh | 176 | command: test_tpm2_akparse.sh |
791 | 163 | flags: preserve-cwd | 177 | flags: preserve-cwd |
792 | @@ -167,6 +181,7 @@ category_id: tpm2 | |||
793 | 167 | depends: tpm2.0/tpm2_takeownership | 181 | depends: tpm2.0/tpm2_takeownership |
794 | 168 | estimated_duration: 20 | 182 | estimated_duration: 20 |
795 | 169 | plugin: shell | 183 | plugin: shell |
796 | 184 | user: root | ||
797 | 170 | _summary: tpm2_certify | 185 | _summary: tpm2_certify |
798 | 171 | command: test_tpm2_certify.sh | 186 | command: test_tpm2_certify.sh |
799 | 172 | flags: preserve-cwd | 187 | flags: preserve-cwd |
800 | @@ -176,6 +191,7 @@ category_id: tpm2 | |||
801 | 176 | depends: tpm2.0/tpm2_takeownership | 191 | depends: tpm2.0/tpm2_takeownership |
802 | 177 | estimated_duration: 10 | 192 | estimated_duration: 10 |
803 | 178 | plugin: shell | 193 | plugin: shell |
804 | 194 | user: root | ||
805 | 179 | _summary: tpm2_getpubek | 195 | _summary: tpm2_getpubek |
806 | 180 | command: test_tpm2_getpubek.sh | 196 | command: test_tpm2_getpubek.sh |
807 | 181 | flags: preserve-cwd | 197 | flags: preserve-cwd |
808 | @@ -185,6 +201,7 @@ category_id: tpm2 | |||
809 | 185 | depends: tpm2.0/tpm2_takeownership | 201 | depends: tpm2.0/tpm2_takeownership |
810 | 186 | estimated_duration: 10 | 202 | estimated_duration: 10 |
811 | 187 | plugin: shell | 203 | plugin: shell |
812 | 204 | user: root | ||
813 | 188 | _summary: tpm2_getpubak | 205 | _summary: tpm2_getpubak |
814 | 189 | command: test_tpm2_getpubak.sh | 206 | command: test_tpm2_getpubak.sh |
815 | 190 | flags: preserve-cwd | 207 | flags: preserve-cwd |
816 | @@ -194,6 +211,7 @@ category_id: tpm2 | |||
817 | 194 | depends: tpm2.0/tpm2_takeownership | 211 | depends: tpm2.0/tpm2_takeownership |
818 | 195 | estimated_duration: 20 | 212 | estimated_duration: 20 |
819 | 196 | plugin: shell | 213 | plugin: shell |
820 | 214 | user: root | ||
821 | 197 | _summary: tpm2_makecredential | 215 | _summary: tpm2_makecredential |
822 | 198 | command: test_tpm2_makecredential.sh | 216 | command: test_tpm2_makecredential.sh |
823 | 199 | flags: preserve-cwd | 217 | flags: preserve-cwd |
824 | @@ -203,6 +221,7 @@ category_id: tpm2 | |||
825 | 203 | depends: tpm2.0/tpm2_takeownership | 221 | depends: tpm2.0/tpm2_takeownership |
826 | 204 | estimated_duration: 20 | 222 | estimated_duration: 20 |
827 | 205 | plugin: shell | 223 | plugin: shell |
828 | 224 | user: root | ||
829 | 206 | _summary: tpm2_activatecredential | 225 | _summary: tpm2_activatecredential |
830 | 207 | command: test_tpm2_activecredential.sh | 226 | command: test_tpm2_activecredential.sh |
831 | 208 | flags: preserve-cwd | 227 | flags: preserve-cwd |
832 | @@ -212,6 +231,7 @@ category_id: tpm2 | |||
833 | 212 | depends: tpm2.0/tpm2_takeownership | 231 | depends: tpm2.0/tpm2_takeownership |
834 | 213 | estimated_duration: 20 | 232 | estimated_duration: 20 |
835 | 214 | plugin: shell | 233 | plugin: shell |
836 | 234 | user: root | ||
837 | 215 | _summary: tpm2_readpublic | 235 | _summary: tpm2_readpublic |
838 | 216 | command: test_tpm2_readpublic.sh | 236 | command: test_tpm2_readpublic.sh |
839 | 217 | flags: preserve-cwd | 237 | flags: preserve-cwd |
840 | @@ -221,6 +241,7 @@ category_id: tpm2 | |||
841 | 221 | depends: tpm2.0/tpm2_takeownership | 241 | depends: tpm2.0/tpm2_takeownership |
842 | 222 | estimated_duration: 40 | 242 | estimated_duration: 40 |
843 | 223 | plugin: shell | 243 | plugin: shell |
844 | 244 | user: root | ||
845 | 224 | _summary: tpm2_rsaencrypt | 245 | _summary: tpm2_rsaencrypt |
846 | 225 | command: test_tpm2_rsaencrypt.sh | 246 | command: test_tpm2_rsaencrypt.sh |
847 | 226 | flags: preserve-cwd | 247 | flags: preserve-cwd |
848 | @@ -230,6 +251,7 @@ category_id: tpm2 | |||
849 | 230 | depends: tpm2.0/tpm2_takeownership | 251 | depends: tpm2.0/tpm2_takeownership |
850 | 231 | estimated_duration: 40 | 252 | estimated_duration: 40 |
851 | 232 | plugin: shell | 253 | plugin: shell |
852 | 254 | user: root | ||
853 | 233 | _summary: tpm2_rsadecrypt | 255 | _summary: tpm2_rsadecrypt |
854 | 234 | command: test_tpm2_rsadecrypt.sh | 256 | command: test_tpm2_rsadecrypt.sh |
855 | 235 | flags: preserve-cwd | 257 | flags: preserve-cwd |
856 | @@ -239,6 +261,7 @@ category_id: tpm2 | |||
857 | 239 | depends: tpm2.0/tpm2_takeownership | 261 | depends: tpm2.0/tpm2_takeownership |
858 | 240 | estimated_duration: 40 | 262 | estimated_duration: 40 |
859 | 241 | plugin: shell | 263 | plugin: shell |
860 | 264 | user: root | ||
861 | 242 | _summary: tpm2_encryptdecrypt | 265 | _summary: tpm2_encryptdecrypt |
862 | 243 | command: test_tpm2_encryptdecrypt.sh | 266 | command: test_tpm2_encryptdecrypt.sh |
863 | 244 | flags: preserve-cwd | 267 | flags: preserve-cwd |
864 | @@ -248,6 +271,7 @@ category_id: tpm2 | |||
865 | 248 | depends: tpm2.0/tpm2_takeownership | 271 | depends: tpm2.0/tpm2_takeownership |
866 | 249 | estimated_duration: 20 | 272 | estimated_duration: 20 |
867 | 250 | plugin: shell | 273 | plugin: shell |
868 | 274 | user: root | ||
869 | 251 | _summary: tpm2_sign | 275 | _summary: tpm2_sign |
870 | 252 | command: test_tpm2_sign.sh | 276 | command: test_tpm2_sign.sh |
871 | 253 | flags: preserve-cwd | 277 | flags: preserve-cwd |
872 | @@ -257,6 +281,7 @@ category_id: tpm2 | |||
873 | 257 | depends: tpm2.0/tpm2_takeownership | 281 | depends: tpm2.0/tpm2_takeownership |
874 | 258 | estimated_duration: 20 | 282 | estimated_duration: 20 |
875 | 259 | plugin: shell | 283 | plugin: shell |
876 | 284 | user: root | ||
877 | 260 | _summary: tpm2_verifysignature | 285 | _summary: tpm2_verifysignature |
878 | 261 | command: test_tpm2_verifysignature.sh | 286 | command: test_tpm2_verifysignature.sh |
879 | 262 | flags: preserve-cwd | 287 | flags: preserve-cwd |
+/- 1
Let me xplain, it's probably the less annoying way to solve the problem but keep in mind the same test are used via deb packages too.
So let's keep your first commit but also add user: root to every single job in: https:/ /git.launchpad. net/plainbox- provider- tpm2/tree/ units/tpm2_ 1.1.pxu