~jocave/checkbox/hybrid-amd-gpu-mods

« back to all changes in this revision

Viewing changes to providers/plainbox-provider-tpm2/bin/test_tpm2_hash_all.sh

  • Committer: Sylvain Pineau
  • Date: 2016-05-09 21:46:18 UTC
  • mto: This revision was merged to the branch mainline in revision 4336.
  • Revision ID: sylvain.pineau@canonical.com-20160509214618-2bqr8mfuge7fkq8d
providers:tpm2: New provider including all upstream integration tests for TPM 2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
#this script is for hash case testing 
 
4
halg=
 
5
Hierarchy=
 
6
 
 
7
rm test_hash.log
 
8
 
 
9
if [ ! -f hash.in ];then
 
10
echo "T0naX0u123abc" >hash.in
 
11
fi
 
12
 
 
13
for Hierarchy in e o p n  
 
14
do
 
15
        for halg in 0x0004 0x000B 0x000C 0x000D 0x0012
 
16
        do
 
17
        
 
18
        tpm2_hash -H $Hierarchy -g $halg -I hash.in -o hash_out_"$Hierarchy"_"$halg" -t hash_tk_"$Hierarchy"_"$halg"
 
19
        if [ $? != 0 ];then
 
20
            echo "hash for hash_out_"$Hierarchy"_"$halg" fail, please check the environment or parameters!"
 
21
         else
 
22
            echo "hash for hash_out_"$Hierarchy"_"$halg" pass" >>test_hash_pass.log
 
23
        fi
 
24
        
 
25
         done
 
26
done
 
27
 
 
28
 
 
29