Merge ~jocave/plainbox-provider-tpm2:move-to-roots-home into plainbox-provider-tpm2:master

Proposed by Jonathan Cave
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)
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

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.

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

+/- 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

review: Needs Fixing
Revision history for this message
Jonathan Cave (jocave) wrote :

Modifed the tpm2_1.1 jobs to ensure run as root.

review: Needs Resubmitting
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

"Don't push the red button!"

I did

review: Approve
Revision history for this message
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://paste.ubuntu.com/p/gHZx4CkTDj/
[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://paste.ubuntu.com/p/ymp684z5H7/
[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/container-tests-provider-tpm2
[trusty] [07:54:47] container-tests-provider-tpm2: PASS
[trusty] [07:54:47] Fixing file permissions in source directory
[trusty] [07:54:47] Destroying container

review: Needs Fixing
Revision history for this message
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://paste.ubuntu.com/p/7d4TZp2TV9/
[xenial] NOTE: unable to execute tests, marked as failed
[xenial] Destroying failed container to reclaim resources
[bionic] output: https://paste.ubuntu.com/p/zWnTMT2NQH/
[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/container-tests-provider-tpm2
[trusty] [10:13:26] container-tests-provider-tpm2: PASS
[trusty] [10:13:26] Fixing file permissions in source directory
[trusty] [10:13:26] Destroying container

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/bin/test_tpm2_activecredential.sh b/bin/test_tpm2_activecredential.sh
index 01d31b6..a2f67c7 100755
--- a/bin/test_tpm2_activecredential.sh
+++ b/bin/test_tpm2_activecredential.sh
@@ -37,12 +37,12 @@ ak_alg=0x0001
37digestAlg=0x000B 37digestAlg=0x000B
38signAlg=0x001438signAlg=0x0014
3939
40file_input_data=/home/$USER/secret.data40file_input_data=/root/secret.data
41output_ek_pub=/home/$USER/ek_pub.out41output_ek_pub=/root/ek_pub.out
42output_ak_pub=/home/$USER/ak_pub.out42output_ak_pub=/root/ak_pub.out
43output_ak_pub_name=/home/$USER/ak_name_pub.out43output_ak_pub_name=/root/ak_name_pub.out
44output_mkcredential=/home/$USER/mkcredential.out44output_mkcredential=/root/mkcredential.out
45output_actcredential=/home/$USER/actcredential.out45output_actcredential=/root/actcredential.out
4646
47fail()47fail()
48{48{
@@ -62,12 +62,12 @@ if [ $? != 0 ] || [ ! -e $output_ek_pub ];then
62 fail getpubek 62 fail getpubek
63fi63fi
6464
65tpm2_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_ak65tpm2_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
66if [ $? != 0 ] || [ ! -e /home/$USER/output_ak ];then66if [ $? != 0 ] || [ ! -e /root/output_ak ];then
67 fail getpubak 67 fail getpubak
68fi68fi
69grep -A 3 "Name of loaded key:" /home/$USER/output_ak|tr "\n" " " >/home/$USER/grep.txt69grep -A 3 "Name of loaded key:" /root/output_ak|tr "\n" " " >/root/grep.txt
70Loadkeyname=`sed -e 's/ //g' /home/$USER/grep.txt | awk -F':' '{print $2}'`70Loadkeyname=`sed -e 's/ //g' /root/grep.txt | awk -F':' '{print $2}'`
7171
72tpm2_makecredential -e $output_ek_pub -s $file_input_data -n $Loadkeyname -o $output_mkcredential72tpm2_makecredential -e $output_ek_pub -s $file_input_data -n $Loadkeyname -o $output_mkcredential
73if [ $? != 0 ];then73if [ $? != 0 ];then
diff --git a/bin/test_tpm2_akparse.sh b/bin/test_tpm2_akparse.sh
index 40785f0..ff00ae5 100755
--- a/bin/test_tpm2_akparse.sh
+++ b/bin/test_tpm2_akparse.sh
@@ -34,8 +34,8 @@
34new_path=`dirname $0`34new_path=`dirname $0`
35PATH="$PATH":"$new_path"35PATH="$PATH":"$new_path"
3636
37file_input_data=/home/$USER/ak_pub.out37file_input_data=/root/ak_pub.out
38output_akparse=/home/$USER/akparse.out38output_akparse=/root/akparse.out
3939
40rm $output_ekparse -rf 40rm $output_ekparse -rf
4141
diff --git a/bin/test_tpm2_certify.sh b/bin/test_tpm2_certify.sh
index 56e23a6..dd1e17d 100755
--- a/bin/test_tpm2_certify.sh
+++ b/bin/test_tpm2_certify.sh
@@ -30,13 +30,13 @@
30# THE POSSIBILITY OF SUCH DAMAGE.30# THE POSSIBILITY OF SUCH DAMAGE.
31#;**********************************************************************;31#;**********************************************************************;
32#!/bin/bash32#!/bin/bash
33file_primary_key_ctx=/home/$USER/context.p_B133file_primary_key_ctx=/root/context.p_B1
34file_certify_key_pub=/home/$USER/opuB1_B834file_certify_key_pub=/root/opuB1_B8
35file_certify_key_priv=/home/$USER/oprB1_B835file_certify_key_priv=/root/oprB1_B8
36file_certify_key_ctx=/home/$USER/context_load_out_B1_B836file_certify_key_ctx=/root/context_load_out_B1_B8
37file_certify_key_name=/home/$USER/name.load.B1_B837file_certify_key_name=/root/name.load.B1_B8
38file_output_attest=/home/$USER/attest.out38file_output_attest=/root/attest.out
39file_output_signature=/home/$USER/certify_signature.out39file_output_signature=/root/certify_signature.out
40 40
4141
42alg_hash=0x000B42alg_hash=0x000B
diff --git a/bin/test_tpm2_create_all.sh b/bin/test_tpm2_create_all.sh
index 7664c70..81056a3 100755
--- a/bin/test_tpm2_create_all.sh
+++ b/bin/test_tpm2_create_all.sh
@@ -39,9 +39,9 @@ GAlg=
39gAlgList="0x04 0x0B"39gAlgList="0x04 0x0B"
40STATUS=040STATUS=0
4141
42rm -f /home/$USER/create.error.log /home/$USER/opr* /home/$USER/opu*42rm -f /root/create.error.log /root/opr* /root/opu*
4343
44ctx_count=`ls /home/$USER/ | grep -c ^ctx.cpri`44ctx_count=`ls /root/ | grep -c ^ctx.cpri`
45if [ $ctx_count -le 1 ];then45if [ $ctx_count -le 1 ];then
46 echo "we should execute test_tpm2_createprimary_all.sh first!"46 echo "we should execute test_tpm2_createprimary_all.sh first!"
47 test_tpm2_createprimary_all.sh47 test_tpm2_createprimary_all.sh
@@ -59,16 +59,16 @@ if [[ "$@" == *"--sm3256"* ]]; then
59 gAlgList="$gAlgList 0x12"59 gAlgList="$gAlgList 0x12"
60fi60fi
6161
62for pCtx in `ls /home/$USER/ctx.cpri*`62for pCtx in `ls /root/ctx.cpri*`
63 do63 do
64 for gAlg in $gAlgList64 for gAlg in $gAlgList
65 do 65 do
66 for GAlg in 0x01 0x08 0x23 0x2566 for GAlg in 0x01 0x08 0x23 0x25
67 do 67 do
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"
69 if [ $? != 0 ];then 69 if [ $? != 0 ];then
70 echo "tpm2_create error: pCtx=$pCtx gAlg=$gAlg GAlg=$GAlg"70 echo "tpm2_create error: pCtx=$pCtx gAlg=$gAlg GAlg=$GAlg"
71 echo "tpm2_create error: pCtx=$pCtx gAlg=$gAlg GAlg=$GAlg" >> /home/$USER/create.error.log71 echo "tpm2_create error: pCtx=$pCtx gAlg=$gAlg GAlg=$GAlg" >> /root/create.error.log
72 STATUS=172 STATUS=1
73 fi73 fi
74 done74 done
diff --git a/bin/test_tpm2_createprimary_all.sh b/bin/test_tpm2_createprimary_all.sh
index b7f5f9a..658b6ab 100755
--- a/bin/test_tpm2_createprimary_all.sh
+++ b/bin/test_tpm2_createprimary_all.sh
@@ -54,7 +54,7 @@ if [[ "$@" == *"--platform"* ]]; then
54 AtypeList="$AtypeList p"54 AtypeList="$AtypeList p"
55fi55fi
5656
57rm -f /home/$USER/createprimary.error.log /home/$USER/ctx.cpri.*57rm -f /root/createprimary.error.log /root/ctx.cpri.*
5858
59for gAlg in $gAlgList59for gAlg in $gAlgList
60 do 60 do
@@ -62,10 +62,10 @@ for gAlg in $gAlgList
62 do 62 do
63 for Atype in $AtypeList63 for Atype in $AtypeList
64 do 64 do
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"
66 if [ $? != 0 ];then 66 if [ $? != 0 ];then
67 echo "tpm2_createprimary error: Atype=$Atype gAlg=$gAlg GAlg=$GAlg"67 echo "tpm2_createprimary error: Atype=$Atype gAlg=$gAlg GAlg=$GAlg"
68 echo "tpm2_createprimary error: Atype=$Atype gAlg=$gAlg GAlg=$GAlg" >> /home/$USER/createprimary.error.log68 echo "tpm2_createprimary error: Atype=$Atype gAlg=$gAlg GAlg=$GAlg" >> /root/createprimary.error.log
69 STATUS=169 STATUS=1
70 fi70 fi
71 done71 done
diff --git a/bin/test_tpm2_encryptdecrypt.sh b/bin/test_tpm2_encryptdecrypt.sh
index 1d7f4ff..5373595 100755
--- a/bin/test_tpm2_encryptdecrypt.sh
+++ b/bin/test_tpm2_encryptdecrypt.sh
@@ -35,14 +35,14 @@ alg_primary_key=0x0001
35alg_create_obj=0x000B35alg_create_obj=0x000B
36alg_create_key=0x002536alg_create_key=0x0025
3737
38file_input_data=/home/$USER/secret.data38file_input_data=/root/secret.data
39file_primary_key_ctx=/home/$USER/context.p_"$alg_primary_obj"_"$alg_primary_key"39file_primary_key_ctx=/root/context.p_"$alg_primary_obj"_"$alg_primary_key"
40file_en_decrypt_key_pub=/home/$USER/opu_"$alg_create_obj"_"$alg_create_key"40file_en_decrypt_key_pub=/root/opu_"$alg_create_obj"_"$alg_create_key"
41file_en_decrypt_key_priv=/home/$USER/opr_"$alg_create_obj"_"$alg_create_key"41file_en_decrypt_key_priv=/root/opr_"$alg_create_obj"_"$alg_create_key"
42file_en_decrypt_key_name=/home/$USER/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"42file_en_decrypt_key_name=/root/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"
43file_en_decrypt_key_ctx=/home/$USER/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"43file_en_decrypt_key_ctx=/root/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"
44file_encrypt_output_data=/home/$USER/encrypt_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"44file_encrypt_output_data=/root/encrypt_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"
45file_decrypt_output_data=/home/$USER/decrypt_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"45file_decrypt_output_data=/root/decrypt_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"
4646
47fail()47fail()
48{48{
@@ -51,7 +51,7 @@ fail()
51}51}
52Pass()52Pass()
53{53{
54 echo ""$1" pass" >>/home/$USER/test_getpubak_pass.log54 echo ""$1" pass" >>/root/test_getpubak_pass.log
55}55}
5656
57rm $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 -rf57rm $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
diff --git a/bin/test_tpm2_evictcontrol.sh b/bin/test_tpm2_evictcontrol.sh
index a35aeb5..d58ba45 100755
--- a/bin/test_tpm2_evictcontrol.sh
+++ b/bin/test_tpm2_evictcontrol.sh
@@ -30,11 +30,11 @@
30# THE POSSIBILITY OF SUCH DAMAGE.30# THE POSSIBILITY OF SUCH DAMAGE.
31#;**********************************************************************;31#;**********************************************************************;
32#!/bin/bash32#!/bin/bash
33file_primary_key_ctx=/home/$USER/context.p_B133file_primary_key_ctx=/root/context.p_B1
34file_evict_key_pub=/home/$USER/opuB1_B834file_evict_key_pub=/root/opuB1_B8
35file_evict_key_priv=/home/$USER/oprB1_B835file_evict_key_priv=/root/oprB1_B8
36file_evict_key_ctx=/home/$USER/context_load_out_B1_B836file_evict_key_ctx=/root/context_load_out_B1_B8
37file_evict_key_name=/home/$USER/name.load.B1_B837file_evict_key_name=/root/name.load.B1_B8
38 38
39persistentHandle=0x8101000339persistentHandle=0x81010003
4040
diff --git a/bin/test_tpm2_getpubak.sh b/bin/test_tpm2_getpubak.sh
index 618173e..139473f 100755
--- a/bin/test_tpm2_getpubak.sh
+++ b/bin/test_tpm2_getpubak.sh
@@ -36,9 +36,9 @@ ek_alg=0x001
36ak_alg=0x000136ak_alg=0x0001
37digestAlg=0x000B 37digestAlg=0x000B
38signAlg=0x001438signAlg=0x0014
39output_ek_pub=/home/$USER/ek_pub.out39output_ek_pub=/root/ek_pub.out
40output_ak_pub=/home/$USER/ak_pub.out40output_ak_pub=/root/ak_pub.out
41output_ak_pub_name=/home/$USER/ak_name_pub.out41output_ak_pub_name=/root/ak_name_pub.out
4242
43rm $output_ek_pub $output_ak_pub $output_ak_pub_name -rf 43rm $output_ek_pub $output_ak_pub $output_ak_pub_name -rf
4444
diff --git a/bin/test_tpm2_getpubek.sh b/bin/test_tpm2_getpubek.sh
index 1025578..ad8eaf0 100755
--- a/bin/test_tpm2_getpubek.sh
+++ b/bin/test_tpm2_getpubek.sh
@@ -32,7 +32,7 @@
32#!/bin/bash32#!/bin/bash
33handle_ek=0x8101000533handle_ek=0x81010005
34ek_alg=0x00134ek_alg=0x001
35output_ek_pub=/home/$USER/ek_pub.out35output_ek_pub=/root/ek_pub.out
3636
37rm -f $output_ek_pub37rm -f $output_ek_pub
3838
diff --git a/bin/test_tpm2_getrandom.sh b/bin/test_tpm2_getrandom.sh
index 826162a..7b50ec7 100755
--- a/bin/test_tpm2_getrandom.sh
+++ b/bin/test_tpm2_getrandom.sh
@@ -33,9 +33,9 @@
3333
34size=3234size=32
3535
36rm -f /home/$USER/random.out36rm -f /root/random.out
3737
38tpm2_getrandom -s 32 -o /home/$USER/random.out38tpm2_getrandom -s 32 -o /root/random.out
39if [ $? != 0 ];then39if [ $? != 0 ];then
40 echo "getrandom test fail, please check the environment or parameters!"40 echo "getrandom test fail, please check the environment or parameters!"
41 exit 141 exit 1
diff --git a/bin/test_tpm2_getrandom_func.sh b/bin/test_tpm2_getrandom_func.sh
index 2182ea8..e431e86 100755
--- a/bin/test_tpm2_getrandom_func.sh
+++ b/bin/test_tpm2_getrandom_func.sh
@@ -32,7 +32,7 @@
32#!/bin/sh32#!/bin/sh
33#this script for tpm2_getrandom verification 33#this script for tpm2_getrandom verification
3434
35LOG_FILE=/home/$USER/random_pass_count.log35LOG_FILE=/root/random_pass_count.log
36 if [ -e "$LOG_FILE" ];then36 if [ -e "$LOG_FILE" ];then
37 rm -f "$LOG_FILE"37 rm -f "$LOG_FILE"
38 fi38 fi
@@ -40,7 +40,7 @@ i=
4040
41#for((i=1;i<=10;i++)); do41#for((i=1;i<=10;i++)); do
42for i in `seq 100`; do42for i in `seq 100`; do
43 tpm2_getrandom -s 32 -o /home/$USER/random_"$i".out43 tpm2_getrandom -s 32 -o /root/random_"$i".out
44 if [ $? != 0 ];then44 if [ $? != 0 ];then
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!"
46 exit 246 exit 2
diff --git a/bin/test_tpm2_hash.sh b/bin/test_tpm2_hash.sh
index 11cc26c..5b24b0b 100755
--- a/bin/test_tpm2_hash.sh
+++ b/bin/test_tpm2_hash.sh
@@ -35,14 +35,14 @@
35halg=0x000B35halg=0x000B
36Hierarchy=e36Hierarchy=e
3737
38rm -f /home/$USER/hash_out_"$Hierarchy"_"$halg" /home/$USER/hash_tk_"$Hierarchy"_"$halg"38rm -f /root/hash_out_"$Hierarchy"_"$halg" /root/hash_tk_"$Hierarchy"_"$halg"
3939
40if [ ! -f /home/$USER/hash.in ];then40if [ ! -f /root/hash.in ];then
41echo "T0naX0u123abc" >/home/$USER/hash.in41echo "T0naX0u123abc" >/root/hash.in
42fi42fi
4343
44 44
45tpm2_hash -H $Hierarchy -g $halg -I /home/$USER/hash.in -o /home/$USER/hash_out_"$Hierarchy"_"$halg" -t /home/$USER/hash_tk_"$Hierarchy"_"$halg"45tpm2_hash -H $Hierarchy -g $halg -I /root/hash.in -o /root/hash_out_"$Hierarchy"_"$halg" -t /root/hash_tk_"$Hierarchy"_"$halg"
46if [ $? != 0 ];then46if [ $? != 0 ];then
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!"
48 exit 148 exit 1
diff --git a/bin/test_tpm2_hmac.sh b/bin/test_tpm2_hmac.sh
index a0b5000..e668bd9 100755
--- a/bin/test_tpm2_hmac.sh
+++ b/bin/test_tpm2_hmac.sh
@@ -38,14 +38,14 @@ halg=0x000B
3838
39handle_hmac_key=0x8101001339handle_hmac_key=0x81010013
4040
41file_primary_key_ctx=/home/$USER/context.p_"$alg_primary_obj"_"$alg_primary_key"41file_primary_key_ctx=/root/context.p_"$alg_primary_obj"_"$alg_primary_key"
42file_hmac_key_pub=/home/$USER/opu_"$alg_create_obj"_"$alg_create_key"42file_hmac_key_pub=/root/opu_"$alg_create_obj"_"$alg_create_key"
43file_hmac_key_priv=/home/$USER/opr_"$alg_create_obj"_"$alg_create_key"43file_hmac_key_priv=/root/opr_"$alg_create_obj"_"$alg_create_key"
44file_hmac_key_name=/home/$USER/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"44file_hmac_key_name=/root/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"
45file_hmac_key_ctx=/home/$USER/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"45file_hmac_key_ctx=/root/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"
46file_hmac_output=/home/$USER/hmac_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"46file_hmac_output=/root/hmac_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"
4747
48file_input_data=/home/$USER/secret.data48file_input_data=/root/secret.data
4949
50fail()50fail()
51{51{
@@ -54,7 +54,7 @@ fail()
54}54}
55Pass()55Pass()
56{56{
57 echo ""$1" pass" >>/home/$USER/test_getpubak_pass.log57 echo ""$1" pass" >>/root/test_getpubak_pass.log
58}58}
5959
60rm $file_primary_key_ctx $file_hmac_key_pub $file_hmac_key_priv $file_hmac_key_name $file_hmac_key_ctx $file_hmac_output -rf60rm $file_primary_key_ctx $file_hmac_key_pub $file_hmac_key_priv $file_hmac_key_name $file_hmac_key_ctx $file_hmac_output -rf
@@ -87,9 +87,9 @@ fi
8787
88####handle test88####handle test
89rm -f $file_hmac_output 89rm -f $file_hmac_output
90tpm2_evictcontrol -A o -c $file_hmac_key_ctx -S $handle_hmac_key |tee /home/$USER/evict.log90tpm2_evictcontrol -A o -c $file_hmac_key_ctx -S $handle_hmac_key |tee /root/evict.log
91c1="$?"91c1="$?"
92grep "persistentHandle: "$handle_hmac_key"" /home/$USER/evict.log92grep "persistentHandle: "$handle_hmac_key"" /root/evict.log
93c2="$?"93c2="$?"
9494
95if [ $c1 != 0 ] || [ $c2 != 0 ];then95if [ $c1 != 0 ] || [ $c2 != 0 ];then
diff --git a/bin/test_tpm2_listpcrs.sh b/bin/test_tpm2_listpcrs.sh
index 3fac1cf..beaa55d 100755
--- a/bin/test_tpm2_listpcrs.sh
+++ b/bin/test_tpm2_listpcrs.sh
@@ -46,9 +46,9 @@ if [ $? != 0 ];then
46 exit 146 exit 1
47fi47fi
4848
49rm -rf /home/$USER/pcrs49rm -rf /root/pcrs
5050
51tpm2_listpcrs -L 0x04:17,18,19+0x0b:0,17,18,19 -o /home/$USER/pcrs51tpm2_listpcrs -L 0x04:17,18,19+0x0b:0,17,18,19 -o /root/pcrs
5252
53if [ $? != 0 ];then 53if [ $? != 0 ];then
54 echo "listpcrs fail!"54 echo "listpcrs fail!"
diff --git a/bin/test_tpm2_load.sh b/bin/test_tpm2_load.sh
index e348d79..297a980 100755
--- a/bin/test_tpm2_load.sh
+++ b/bin/test_tpm2_load.sh
@@ -37,12 +37,12 @@ alg_create_key=0x0008
3737
38alg_load=0x000438alg_load=0x0004
3939
40file_primary_key_ctx=/home/$USER/context.p_"$alg_primary_obj"_"$alg_primary_key"40file_primary_key_ctx=/root/context.p_"$alg_primary_obj"_"$alg_primary_key"
41file_load_key_pub=/home/$USER/opu_"$alg_create_obj"_"$alg_create_key"41file_load_key_pub=/root/opu_"$alg_create_obj"_"$alg_create_key"
42file_load_key_priv=/home/$USER/opr_"$alg_create_obj"_"$alg_create_key"42file_load_key_priv=/root/opr_"$alg_create_obj"_"$alg_create_key"
43file_load_key_name=/home/$USER/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"43file_load_key_name=/root/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"
44file_load_key_ctx=/home/$USER/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"44file_load_key_ctx=/root/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"
45file_load_output=/home/$USER/load_"$file_load_key_ctx"45file_load_output=/root/load_"$file_load_key_ctx"
4646
47Handle_parent=0x8101001847Handle_parent=0x81010018
48Handle_ek_load=0x8101001748Handle_ek_load=0x81010017
@@ -55,7 +55,7 @@ fail()
55}55}
56Pass()56Pass()
57{57{
58 echo ""$1" pass" >>/home/$USER/test_getpubak_pass.log58 echo ""$1" pass" >>/root/test_getpubak_pass.log
59}59}
6060
61rm $file_primary_key_ctx $file_load_key_pub $file_load_key_priv $file_load_key_name $file_load_key_ctx $file_load_output -rf61rm $file_primary_key_ctx $file_load_key_pub $file_load_key_priv $file_load_key_name $file_load_key_ctx $file_load_output -rf
diff --git a/bin/test_tpm2_loadexternal.sh b/bin/test_tpm2_loadexternal.sh
index 60da495..c60f363 100755
--- a/bin/test_tpm2_loadexternal.sh
+++ b/bin/test_tpm2_loadexternal.sh
@@ -36,12 +36,12 @@ alg_create_obj=0x000B
36alg_create_key=0x000836alg_create_key=0x0008
3737
3838
39file_primary_key_ctx=/home/$USER/context.p_"$alg_primary_obj"_"$alg_primary_key"39file_primary_key_ctx=/root/context.p_"$alg_primary_obj"_"$alg_primary_key"
40file_loadexternal_key_pub=/home/$USER/opu_"$alg_create_obj"_"$alg_create_key"40file_loadexternal_key_pub=/root/opu_"$alg_create_obj"_"$alg_create_key"
41file_loadexternal_key_priv=/home/$USER/opr_"$alg_create_obj"_"$alg_create_key"41file_loadexternal_key_priv=/root/opr_"$alg_create_obj"_"$alg_create_key"
42file_loadexternal_key_name=/home/$USER/name.loadexternal_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"42file_loadexternal_key_name=/root/name.loadexternal_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"
43file_loadexternal_key_ctx=/home/$USER/ctx_loadexternal_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"43file_loadexternal_key_ctx=/root/ctx_loadexternal_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"
44file_loadexternal_output=/home/$USER/loadexternal_"$file_loadexternal_key_ctx"44file_loadexternal_output=/root/loadexternal_"$file_loadexternal_key_ctx"
4545
46Handle_parent=0x8101001946Handle_parent=0x81010019
4747
@@ -53,7 +53,7 @@ fail()
53}53}
54Pass()54Pass()
55{55{
56 echo ""$1" pass" >>/home/$USER/test_getpubak_pass.log56 echo ""$1" pass" >>/root/test_getpubak_pass.log
57}57}
5858
59rm $file_primary_key_ctx $file_loadexternal_key_pub $file_loadexternal_key_priv $file_loadexternal_key_name $file_loadexternal_key_ctx $file_loadexternal_output -rf59rm $file_primary_key_ctx $file_loadexternal_key_pub $file_loadexternal_key_priv $file_loadexternal_key_name $file_loadexternal_key_ctx $file_loadexternal_output -rf
diff --git a/bin/test_tpm2_makecredential.sh b/bin/test_tpm2_makecredential.sh
index 741ec4e..04969fd 100755
--- a/bin/test_tpm2_makecredential.sh
+++ b/bin/test_tpm2_makecredential.sh
@@ -37,11 +37,11 @@ ak_alg=0x0001
37digestAlg=0x000B 37digestAlg=0x000B
38signAlg=0x001438signAlg=0x0014
3939
40file_input_data=/home/$USER/secret.data40file_input_data=/root/secret.data
41output_ek_pub=/home/$USER/ek_pub.out41output_ek_pub=/root/ek_pub.out
42output_ak_pub=/home/$USER/ak_pub.out42output_ak_pub=/root/ak_pub.out
43output_ak_pub_name=/home/$USER/ak_name_pub.out43output_ak_pub_name=/root/ak_name_pub.out
44output_mkcredential=/home/$USER/mkcredential.out44output_mkcredential=/root/mkcredential.out
4545
46rm $output_ek_pub $output_ak_pub $output_ak_pub_name $output_mkcredential -rf 46rm $output_ek_pub $output_ak_pub $output_ak_pub_name $output_mkcredential -rf
4747
@@ -56,14 +56,14 @@ if [ $? != 0 ] || [ ! -e $output_ek_pub ];then
56 exit 156 exit 1
57fi57fi
5858
59tpm2_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_ak59tpm2_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
6060
61if [ $? != 0 ] || [ ! -e /home/$USER/output_ak ];then61if [ $? != 0 ] || [ ! -e /root/output_ak ];then
62 echo "getpubak fail, please check the environment or parameters!"62 echo "getpubak fail, please check the environment or parameters!"
63 exit 163 exit 1
64fi64fi
65grep -A 3 "Name of loaded key:" /home/$USER/output_ak|tr "\n" " " >/home/$USER/grep.txt65grep -A 3 "Name of loaded key:" /root/output_ak|tr "\n" " " >/root/grep.txt
66Loadkeyname=`sed -e 's/ //g' /home/$USER/grep.txt | awk -F':' '{print $2}'`66Loadkeyname=`sed -e 's/ //g' /root/grep.txt | awk -F':' '{print $2}'`
6767
68tpm2_makecredential -e $output_ek_pub -s $file_input_data -n $Loadkeyname -o $output_mkcredential68tpm2_makecredential -e $output_ek_pub -s $file_input_data -n $Loadkeyname -o $output_mkcredential
6969
diff --git a/bin/test_tpm2_nv.sh b/bin/test_tpm2_nv.sh
index 4ee0fbe..636455e 100755
--- a/bin/test_tpm2_nv.sh
+++ b/bin/test_tpm2_nv.sh
@@ -55,10 +55,10 @@ fi
5555
5656
57if [ ! -f nv.test_w ];then57if [ ! -f nv.test_w ];then
58echo "please123abc" >/home/$USER/nv.test_w58echo "please123abc" >/root/nv.test_w
59fi59fi
6060
61tpm2_nvwrite -x $nv_test_index -a $nv_auth_handle -f /home/$USER/nv.test_w61tpm2_nvwrite -x $nv_test_index -a $nv_auth_handle -f /root/nv.test_w
62if [ $? != 0 ];then 62if [ $? != 0 ];then
63echo "nvwrite fail!"63echo "nvwrite fail!"
64exit 164exit 1
diff --git a/bin/test_tpm2_readpublic.sh b/bin/test_tpm2_readpublic.sh
index 5281709..2aa56f0 100755
--- a/bin/test_tpm2_readpublic.sh
+++ b/bin/test_tpm2_readpublic.sh
@@ -35,12 +35,12 @@ alg_primary_key=0x0001
35alg_create_obj=0x000B35alg_create_obj=0x000B
36alg_create_key=0x000836alg_create_key=0x0008
3737
38file_primary_key_ctx=/home/$USER/context.p_"$alg_primary_obj"_"$alg_primary_key"38file_primary_key_ctx=/root/context.p_"$alg_primary_obj"_"$alg_primary_key"
39file_readpub_key_pub=/home/$USER/opu_"$alg_create_obj"_"$alg_create_key"39file_readpub_key_pub=/root/opu_"$alg_create_obj"_"$alg_create_key"
40file_readpub_key_priv=/home/$USER/opr_"$alg_create_obj"_"$alg_create_key"40file_readpub_key_priv=/root/opr_"$alg_create_obj"_"$alg_create_key"
41file_readpub_key_name=/home/$USER/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"41file_readpub_key_name=/root/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"
42file_readpub_key_ctx=/home/$USER/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"42file_readpub_key_ctx=/root/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"
43file_readpub_output=/home/$USER/readpub_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"43file_readpub_output=/root/readpub_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"
4444
45Handle_readpub=0x8101001445Handle_readpub=0x81010014
4646
@@ -51,7 +51,7 @@ fail()
51}51}
52Pass()52Pass()
53{53{
54 echo ""$1" pass" >>/home/$USER/test_getpubak_pass.log54 echo ""$1" pass" >>/root/test_getpubak_pass.log
55}55}
5656
57rm $file_primary_key_ctx $file_readpub_key_pub $file_readpub_key_priv $file_readpub_key_name $file_readpub_key_ctx $file_readpub_output -rf57rm $file_primary_key_ctx $file_readpub_key_pub $file_readpub_key_priv $file_readpub_key_name $file_readpub_key_ctx $file_readpub_output -rf
diff --git a/bin/test_tpm2_rsadecrypt.sh b/bin/test_tpm2_rsadecrypt.sh
index 156c703..7cf7797 100755
--- a/bin/test_tpm2_rsadecrypt.sh
+++ b/bin/test_tpm2_rsadecrypt.sh
@@ -30,16 +30,16 @@
30# THE POSSIBILITY OF SUCH DAMAGE.30# THE POSSIBILITY OF SUCH DAMAGE.
31#;**********************************************************************;31#;**********************************************************************;
32#!/bin/bash32#!/bin/bash
33file_primary_key_ctx=/home/$USER/context.p_B133file_primary_key_ctx=/root/context.p_B1
34file_rsaencrypt_key_pub=/home/$USER/opuB1_B834file_rsaencrypt_key_pub=/root/opuB1_B8
35file_rsaencrypt_key_priv=/home/$USER/oprB1_B835file_rsaencrypt_key_priv=/root/oprB1_B8
36file_rsaencrypt_key_ctx=/home/$USER/context_loadext_out_B1_B836file_rsaencrypt_key_ctx=/root/context_loadext_out_B1_B8
37file_rsadecrypt_key_ctx=/home/$USER/context_load_out_B1_B837file_rsadecrypt_key_ctx=/root/context_load_out_B1_B8
38file_rsaencrypt_key_name=/home/$USER/name.load.B1_B838file_rsaencrypt_key_name=/root/name.load.B1_B8
3939
40file_rsa_en_output_data=/home/$USER/rsa_en.out40file_rsa_en_output_data=/root/rsa_en.out
41file_rsa_de_output_data=/home/$USER/rsa_de.out41file_rsa_de_output_data=/root/rsa_de.out
42file_input_data=/home/$USER/secret.data42file_input_data=/root/secret.data
43 43
44alg_hash=0x000B44alg_hash=0x000B
45alg_primary_key=0x000145alg_primary_key=0x0001
diff --git a/bin/test_tpm2_rsaencrypt.sh b/bin/test_tpm2_rsaencrypt.sh
index 0edb6a9..0b560b2 100755
--- a/bin/test_tpm2_rsaencrypt.sh
+++ b/bin/test_tpm2_rsaencrypt.sh
@@ -30,14 +30,14 @@
30# THE POSSIBILITY OF SUCH DAMAGE.30# THE POSSIBILITY OF SUCH DAMAGE.
31#;**********************************************************************;31#;**********************************************************************;
32#!/bin/bash32#!/bin/bash
33file_primary_key_ctx=/home/$USER/context.p_B133file_primary_key_ctx=/root/context.p_B1
34file_rsaencrypt_key_pub=/home/$USER/opuB1_B834file_rsaencrypt_key_pub=/root/opuB1_B8
35file_rsaencrypt_key_priv=/home/$USER/oprB1_B835file_rsaencrypt_key_priv=/root/oprB1_B8
36file_rsaencrypt_key_ctx=/home/$USER/context_load_out_B1_B836file_rsaencrypt_key_ctx=/root/context_load_out_B1_B8
37file_rsaencrypt_key_name=/home/$USER/name.load.B1_B837file_rsaencrypt_key_name=/root/name.load.B1_B8
3838
39file_rsa_en_output_data=/home/$USER/rsa_en.out39file_rsa_en_output_data=/root/rsa_en.out
40file_input_data=/home/$USER/secret.data40file_input_data=/root/secret.data
41 41
42alg_hash=0x000B42alg_hash=0x000B
43alg_primary_key=0x000143alg_primary_key=0x0001
diff --git a/bin/test_tpm2_sign.sh b/bin/test_tpm2_sign.sh
index 1c6f431..8e23645 100755
--- a/bin/test_tpm2_sign.sh
+++ b/bin/test_tpm2_sign.sh
@@ -31,13 +31,13 @@
31#;**********************************************************************;31#;**********************************************************************;
32#!/bin/bash32#!/bin/bash
3333
34file_primary_key_ctx=/home/$USER/context.p_B134file_primary_key_ctx=/root/context.p_B1
35file_signing_key_pub=/home/$USER/opuB1_B835file_signing_key_pub=/root/opuB1_B8
36file_signing_key_priv=/home/$USER/oprB1_B836file_signing_key_priv=/root/oprB1_B8
37file_signing_key_ctx=/home/$USER/context_load_out_B1_B837file_signing_key_ctx=/root/context_load_out_B1_B8
38file_signing_key_name=/home/$USER/name.load.B1_B838file_signing_key_name=/root/name.load.B1_B8
39file_input_data=/home/$USER/secret.data39file_input_data=/root/secret.data
40file_output_data=/home/$USER/sig.440file_output_data=/root/sig.4
4141
42 42
43handle_signing_key=0x8101000543handle_signing_key=0x81010005
@@ -53,7 +53,7 @@ fail()
53}53}
54Pass()54Pass()
55{55{
56 echo ""$1" pass" >>/home/$USER/test_getpubak_pass.log56 echo ""$1" pass" >>/root/test_getpubak_pass.log
57}57}
5858
5959
@@ -85,9 +85,9 @@ else
85 rm $file_output_data -rf85 rm $file_output_data -rf
86fi86fi
8787
88tpm2_evictcontrol -A o -c $file_signing_key_ctx -S $handle_signing_key |tee /home/$USER/evict.log88tpm2_evictcontrol -A o -c $file_signing_key_ctx -S $handle_signing_key |tee /root/evict.log
89c1="$?"89c1="$?"
90grep "persistentHandle: "$handle_signing_key"" /home/$USER/evict.log90grep "persistentHandle: "$handle_signing_key"" /root/evict.log
91c2="$?"91c2="$?"
9292
93if [ $c1 != 0 ] || [ $c2 != 0 ];then93if [ $c1 != 0 ] || [ $c2 != 0 ];then
diff --git a/bin/test_tpm2_unseal.sh b/bin/test_tpm2_unseal.sh
index d66ef8d..9fec84e 100755
--- a/bin/test_tpm2_unseal.sh
+++ b/bin/test_tpm2_unseal.sh
@@ -35,13 +35,13 @@ alg_primary_key=0x0001
35alg_create_obj=0x000B35alg_create_obj=0x000B
36alg_create_key=0x000836alg_create_key=0x0008
3737
38file_input_data=/home/$USER/secret.data38file_input_data=/root/secret.data
39file_primary_key_ctx=/home/$USER/context.p_"$alg_primary_obj"_"$alg_primary_key"39file_primary_key_ctx=/root/context.p_"$alg_primary_obj"_"$alg_primary_key"
40file_unseal_key_pub=/home/$USER/opu_"$alg_create_obj"_"$alg_create_key"40file_unseal_key_pub=/root/opu_"$alg_create_obj"_"$alg_create_key"
41file_unseal_key_priv=/home/$USER/opr_"$alg_create_obj"_"$alg_create_key"41file_unseal_key_priv=/root/opr_"$alg_create_obj"_"$alg_create_key"
42file_unseal_key_ctx=/home/$USER/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"42file_unseal_key_ctx=/root/ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"
43file_unseal_key_name=/home/$USER/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"43file_unseal_key_name=/root/name.load_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"
44file_unseal_output_data=/home/$USER/usl_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"44file_unseal_output_data=/root/usl_ctx_load_out_"$alg_primary_obj"_"$alg_primary_key"-"$alg_create_obj"_"$alg_create_key"
45 45
46rm $file_primary_key_ctx $file_unseal_key_pub $file_unseal_key_priv $file_unseal_key_ctx $file_unseal_key_name $file_unseal_output_data -rf46rm $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
4747
diff --git a/bin/test_tpm2_verifysignature.sh b/bin/test_tpm2_verifysignature.sh
index 6078971..e173f53 100755
--- a/bin/test_tpm2_verifysignature.sh
+++ b/bin/test_tpm2_verifysignature.sh
@@ -30,17 +30,17 @@
30# THE POSSIBILITY OF SUCH DAMAGE.30# THE POSSIBILITY OF SUCH DAMAGE.
31#;**********************************************************************;31#;**********************************************************************;
32#!/bin/bash32#!/bin/bash
33file_primary_key_ctx=/home/$USER/context.p_B133file_primary_key_ctx=/root/context.p_B1
34file_signing_key_pub=/home/$USER/opuB1_B834file_signing_key_pub=/root/opuB1_B8
35file_signing_key_priv=/home/$USER/oprB1_B835file_signing_key_priv=/root/oprB1_B8
36file_signing_key_ctx=/home/$USER/context_load_out_B1_B836file_signing_key_ctx=/root/context_load_out_B1_B8
37file_signing_key_name=/home/$USER/name.load.B1_B837file_signing_key_name=/root/name.load.B1_B8
38file_input_data=/home/$USER/secret.data38file_input_data=/root/secret.data
39file_output_data=/home/$USER/sig.439file_output_data=/root/sig.4
40file_verify_tk_data=/home/$USER/tickt_verify_sig.440file_verify_tk_data=/root/tickt_verify_sig.4
4141
42file_input_data_hash=/home/$USER/secret_hash.data42file_input_data_hash=/root/secret_hash.data
43file_input_data_hash_tk=/home/$USER/secret_hash_tk.data43file_input_data_hash_tk=/root/secret_hash_tk.data
4444
45handle_signing_key=0x8101000545handle_signing_key=0x81010005
4646
@@ -55,7 +55,7 @@ fail()
55}55}
56Pass()56Pass()
57{57{
58 echo ""$1" pass" >>/home/$USER/test_getpubak_pass.log58 echo ""$1" pass" >>/root/test_getpubak_pass.log
59}59}
6060
6161
diff --git a/units/tpm2_1.1.pxu b/units/tpm2_1.1.pxu
index 67a2947..d875f09 100644
--- a/units/tpm2_1.1.pxu
+++ b/units/tpm2_1.1.pxu
@@ -41,6 +41,7 @@ category_id: tpm2
41depends: tpm2.0/init-resource-mgr41depends: tpm2.0/init-resource-mgr
42estimated_duration: 242estimated_duration: 2
43plugin: shell43plugin: shell
44user: root
44_summary: tpm2_takeownership45_summary: tpm2_takeownership
45command: test_tpm2_takeownership_all.sh46command: test_tpm2_takeownership_all.sh
46flags: preserve-cwd47flags: preserve-cwd
@@ -50,6 +51,7 @@ category_id: tpm2
50depends: tpm2.0/tpm2_takeownership51depends: tpm2.0/tpm2_takeownership
51estimated_duration: 252estimated_duration: 2
52plugin: shell53plugin: shell
54user: root
53_summary: tpm2_createprimary55_summary: tpm2_createprimary
54command: test_tpm2_createprimary_all.sh56command: test_tpm2_createprimary_all.sh
55flags: preserve-cwd57flags: preserve-cwd
@@ -59,6 +61,7 @@ category_id: tpm2
59depends: tpm2.0/tpm2_createprimary_all61depends: tpm2.0/tpm2_createprimary_all
60estimated_duration: 262estimated_duration: 2
61plugin: shell63plugin: shell
64user: root
62_summary: tpm2_create65_summary: tpm2_create
63command: test_tpm2_create_all.sh66command: test_tpm2_create_all.sh
64flags: preserve-cwd67flags: preserve-cwd
@@ -68,6 +71,7 @@ category_id: tpm2
68depends: tpm2.0/tpm2_takeownership71depends: tpm2.0/tpm2_takeownership
69estimated_duration: 272estimated_duration: 2
70plugin: shell73plugin: shell
74user: root
71_summary: tpm2 NV tools75_summary: tpm2 NV tools
72command: test_tpm2_nv.sh76command: test_tpm2_nv.sh
73flags: preserve-cwd77flags: preserve-cwd
@@ -77,6 +81,7 @@ category_id: tpm2
77depends: tpm2.0/tpm2_takeownership81depends: tpm2.0/tpm2_takeownership
78estimated_duration: 1582estimated_duration: 15
79plugin: shell83plugin: shell
84user: root
80_summary: tpm2_listpcrs85_summary: tpm2_listpcrs
81command: test_tpm2_listpcrs.sh86command: test_tpm2_listpcrs.sh
82flags: preserve-cwd87flags: preserve-cwd
@@ -86,6 +91,7 @@ category_id: tpm2
86depends: tpm2.0/tpm2_takeownership91depends: tpm2.0/tpm2_takeownership
87estimated_duration: 292estimated_duration: 2
88plugin: shell93plugin: shell
94user: root
89_summary: tpm2_getrandom95_summary: tpm2_getrandom
90command: test_tpm2_getrandom.sh96command: test_tpm2_getrandom.sh
91flags: preserve-cwd97flags: preserve-cwd
@@ -95,6 +101,7 @@ category_id: tpm2
95depends: tpm2.0/tpm2_takeownership101depends: tpm2.0/tpm2_takeownership
96estimated_duration: 20102estimated_duration: 20
97plugin: shell103plugin: shell
104user: root
98_summary: tpm2_load105_summary: tpm2_load
99command: test_tpm2_load.sh106command: test_tpm2_load.sh
100flags: preserve-cwd107flags: preserve-cwd
@@ -104,6 +111,7 @@ category_id: tpm2
104depends: tpm2.0/tpm2_takeownership111depends: tpm2.0/tpm2_takeownership
105estimated_duration: 20112estimated_duration: 20
106plugin: shell113plugin: shell
114user: root
107_summary: tpm2_loadexternal115_summary: tpm2_loadexternal
108command: test_tpm2_loadexternal.sh116command: test_tpm2_loadexternal.sh
109flags: preserve-cwd117flags: preserve-cwd
@@ -113,6 +121,7 @@ category_id: tpm2
113depends: tpm2.0/tpm2_takeownership121depends: tpm2.0/tpm2_takeownership
114estimated_duration: 20122estimated_duration: 20
115plugin: shell123plugin: shell
124user: root
116_summary: tpm2_evictcontrol125_summary: tpm2_evictcontrol
117command: test_tpm2_evictcontrol.sh126command: test_tpm2_evictcontrol.sh
118flags: preserve-cwd127flags: preserve-cwd
@@ -122,6 +131,7 @@ category_id: tpm2
122depends: tpm2.0/tpm2_takeownership131depends: tpm2.0/tpm2_takeownership
123estimated_duration: 20132estimated_duration: 20
124plugin: shell133plugin: shell
134user: root
125_summary: tpm2_hash135_summary: tpm2_hash
126command: test_tpm2_hash.sh136command: test_tpm2_hash.sh
127flags: preserve-cwd137flags: preserve-cwd
@@ -131,6 +141,7 @@ category_id: tpm2
131depends: tpm2.0/tpm2_takeownership141depends: tpm2.0/tpm2_takeownership
132estimated_duration: 10142estimated_duration: 10
133plugin: shell143plugin: shell
144user: root
134_summary: tpm2_hmac145_summary: tpm2_hmac
135command: test_tpm2_hmac.sh146command: test_tpm2_hmac.sh
136flags: preserve-cwd147flags: preserve-cwd
@@ -140,6 +151,7 @@ category_id: tpm2
140depends: tpm2.0/tpm2_takeownership151depends: tpm2.0/tpm2_takeownership
141estimated_duration: 10152estimated_duration: 10
142plugin: shell153plugin: shell
154user: root
143_summary: tpm2_quote155_summary: tpm2_quote
144command: test_tpm2_quote.sh156command: test_tpm2_quote.sh
145flags: preserve-cwd157flags: preserve-cwd
@@ -149,6 +161,7 @@ category_id: tpm2
149depends: tpm2.0/tpm2_takeownership161depends: tpm2.0/tpm2_takeownership
150estimated_duration: 20162estimated_duration: 20
151plugin: shell163plugin: shell
164user: root
152_summary: tpm2_unseal165_summary: tpm2_unseal
153command: test_tpm2_unseal.sh166command: test_tpm2_unseal.sh
154flags: preserve-cwd167flags: preserve-cwd
@@ -158,6 +171,7 @@ category_id: tpm2
158depends: tpm2.0/tpm2_takeownership171depends: tpm2.0/tpm2_takeownership
159estimated_duration: 20172estimated_duration: 20
160plugin: shell173plugin: shell
174user: root
161_summary: tpm2_akparse175_summary: tpm2_akparse
162command: test_tpm2_akparse.sh176command: test_tpm2_akparse.sh
163flags: preserve-cwd177flags: preserve-cwd
@@ -167,6 +181,7 @@ category_id: tpm2
167depends: tpm2.0/tpm2_takeownership181depends: tpm2.0/tpm2_takeownership
168estimated_duration: 20182estimated_duration: 20
169plugin: shell183plugin: shell
184user: root
170_summary: tpm2_certify185_summary: tpm2_certify
171command: test_tpm2_certify.sh186command: test_tpm2_certify.sh
172flags: preserve-cwd187flags: preserve-cwd
@@ -176,6 +191,7 @@ category_id: tpm2
176depends: tpm2.0/tpm2_takeownership191depends: tpm2.0/tpm2_takeownership
177estimated_duration: 10192estimated_duration: 10
178plugin: shell193plugin: shell
194user: root
179_summary: tpm2_getpubek195_summary: tpm2_getpubek
180command: test_tpm2_getpubek.sh196command: test_tpm2_getpubek.sh
181flags: preserve-cwd197flags: preserve-cwd
@@ -185,6 +201,7 @@ category_id: tpm2
185depends: tpm2.0/tpm2_takeownership201depends: tpm2.0/tpm2_takeownership
186estimated_duration: 10202estimated_duration: 10
187plugin: shell203plugin: shell
204user: root
188_summary: tpm2_getpubak205_summary: tpm2_getpubak
189command: test_tpm2_getpubak.sh206command: test_tpm2_getpubak.sh
190flags: preserve-cwd207flags: preserve-cwd
@@ -194,6 +211,7 @@ category_id: tpm2
194depends: tpm2.0/tpm2_takeownership211depends: tpm2.0/tpm2_takeownership
195estimated_duration: 20212estimated_duration: 20
196plugin: shell213plugin: shell
214user: root
197_summary: tpm2_makecredential215_summary: tpm2_makecredential
198command: test_tpm2_makecredential.sh216command: test_tpm2_makecredential.sh
199flags: preserve-cwd217flags: preserve-cwd
@@ -203,6 +221,7 @@ category_id: tpm2
203depends: tpm2.0/tpm2_takeownership221depends: tpm2.0/tpm2_takeownership
204estimated_duration: 20222estimated_duration: 20
205plugin: shell223plugin: shell
224user: root
206_summary: tpm2_activatecredential225_summary: tpm2_activatecredential
207command: test_tpm2_activecredential.sh226command: test_tpm2_activecredential.sh
208flags: preserve-cwd227flags: preserve-cwd
@@ -212,6 +231,7 @@ category_id: tpm2
212depends: tpm2.0/tpm2_takeownership231depends: tpm2.0/tpm2_takeownership
213estimated_duration: 20232estimated_duration: 20
214plugin: shell233plugin: shell
234user: root
215_summary: tpm2_readpublic235_summary: tpm2_readpublic
216command: test_tpm2_readpublic.sh236command: test_tpm2_readpublic.sh
217flags: preserve-cwd237flags: preserve-cwd
@@ -221,6 +241,7 @@ category_id: tpm2
221depends: tpm2.0/tpm2_takeownership241depends: tpm2.0/tpm2_takeownership
222estimated_duration: 40242estimated_duration: 40
223plugin: shell243plugin: shell
244user: root
224_summary: tpm2_rsaencrypt245_summary: tpm2_rsaencrypt
225command: test_tpm2_rsaencrypt.sh246command: test_tpm2_rsaencrypt.sh
226flags: preserve-cwd247flags: preserve-cwd
@@ -230,6 +251,7 @@ category_id: tpm2
230depends: tpm2.0/tpm2_takeownership251depends: tpm2.0/tpm2_takeownership
231estimated_duration: 40252estimated_duration: 40
232plugin: shell253plugin: shell
254user: root
233_summary: tpm2_rsadecrypt255_summary: tpm2_rsadecrypt
234command: test_tpm2_rsadecrypt.sh256command: test_tpm2_rsadecrypt.sh
235flags: preserve-cwd257flags: preserve-cwd
@@ -239,6 +261,7 @@ category_id: tpm2
239depends: tpm2.0/tpm2_takeownership261depends: tpm2.0/tpm2_takeownership
240estimated_duration: 40262estimated_duration: 40
241plugin: shell263plugin: shell
264user: root
242_summary: tpm2_encryptdecrypt265_summary: tpm2_encryptdecrypt
243command: test_tpm2_encryptdecrypt.sh266command: test_tpm2_encryptdecrypt.sh
244flags: preserve-cwd267flags: preserve-cwd
@@ -248,6 +271,7 @@ category_id: tpm2
248depends: tpm2.0/tpm2_takeownership271depends: tpm2.0/tpm2_takeownership
249estimated_duration: 20272estimated_duration: 20
250plugin: shell273plugin: shell
274user: root
251_summary: tpm2_sign275_summary: tpm2_sign
252command: test_tpm2_sign.sh276command: test_tpm2_sign.sh
253flags: preserve-cwd277flags: preserve-cwd
@@ -257,6 +281,7 @@ category_id: tpm2
257depends: tpm2.0/tpm2_takeownership281depends: tpm2.0/tpm2_takeownership
258estimated_duration: 20282estimated_duration: 20
259plugin: shell283plugin: shell
284user: root
260_summary: tpm2_verifysignature285_summary: tpm2_verifysignature
261command: test_tpm2_verifysignature.sh286command: test_tpm2_verifysignature.sh
262flags: preserve-cwd287flags: preserve-cwd

Subscribers

People subscribed via source and target branches

to all changes: