TPM test fail with CDTS for Ubuntu Hardware Certification

Asked by Allumallu Susmitha

HI ubuntu member

We do a CDTS test then the TPM test item occused some errors.
Please refer the fail items and how to fix it?

tpm2_clockrateadjust fail
tpm2_createprimary
tpm2_import
tpm2_loadexternal

========================================
Test Configure:
========================================
Kernel: 5.13.0-1008-intel x86_64
Distro: Ubuntu 20.04.3 LTS (Focal Fossa)
Memory 3.4 GiB
Audio Intel
Graphics Intel
Network Intel
Drives MMC64G 58.27 GiB
========================================

========================================
tpm2_clockrateadjust fail
========================================
+ source helpers.sh
++ set -E
++ tpm2_test_original_cwd=
++ tpm2_test_cwd=
++ tpm2_sim_pid=
++ tpm2_abrmd_pid=
++ tpm2_tcti_opts=
++ tpm2tools_tcti=
++ sock_tool=unknown
+++ uname
++ OS=Linux
++ '[' Linux == Linux ']'
++ sock_tool='ss -lntp4'
++ trap shut_down EXIT
++ trap onerror ERR
+ trap cleanup EXIT
+ start_up
+ switch_to_test_dir
++ pwd
+ tpm2_test_original_cwd=/var/snap/cdts/180
++ mktemp -d /tmp/tpm2_test_XXXXXX
+ tpm2_test_cwd=/tmp/tpm2_test_QAlSsw
+ echo 'creating simulator working dir: /tmp/tpm2_test_QAlSsw'
+ pushd /tmp/tpm2_test_QAlSsw
creating simulator working dir: /tmp/tpm2_test_QAlSsw
/tmp/tpm2_test_QAlSsw /var/snap/cdts/180
++ pwd
+ echo 'Switched to CWD: /tmp/tpm2_test_QAlSsw'
+ run_startup=true
+ export TPM2TOOLS_TCTI=device:/dev/tpmrm0
+ TPM2TOOLS_TCTI=device:/dev/tpmrm0
+ '[' true = true ']'
+ tpm2_startup -c
Switched to CWD: /tmp/tpm2_test_QAlSsw
+ tpm2_clear
+ tpm2_clockrateadjust s
WARNING:esys:src/tss2-esys/api/Esys_ClockRateAdjust.c:287:Esys_ClockRateAdjust_Finish() Received TPM Error
ERROR:esys:src/tss2-esys/api/Esys_ClockRateAdjust.c:100:Esys_ClockRateAdjust() Esys Finish ErrorCode (0x000001c4)
ERROR: Esys_ClockRateAdjust(0x1C4) - tpm:parameter(1):value is out of range or is not correct for the context
ERROR: Unable to run tpm2_clockrateadjust
++ onerror
++ echo 'tpm2_clockrateadjust s on line 19 failed: 1'
++ exit 1
tpm2_clockrateadjust s on line 19 failed: 1
+ cleanup
+ tpm2_changeauth -c o -p newowner
+ true
+ tpm2_changeauth -c p -p newplatform
+ true
+ rm -f clock.yaml
+ '[' '' '!=' no-shut-down ']'
+ shut_down
+ switch_back_from_test_dir
+ popd
+ fail=0
+ '[' -n '' ']'
+ tpm2_abrmd_pid=
+ '[' -n '' ']'
+ tpm2_sim_pid=
+ rm -rf /tmp/tpm2_test_QAlSsw
/var/snap/cdts/180
+ '[' 0 -ne 0 ']'
========================================

========================================
tpm2_createprimary fail
========================================
+ source helpers.sh
++ set -E
++ tpm2_test_original_cwd=
++ tpm2_test_cwd=
++ tpm2_sim_pid=
++ tpm2_abrmd_pid=
++ tpm2_tcti_opts=
++ tpm2tools_tcti=
++ sock_tool=unknown
+++ uname
++ OS=Linux
++ '[' Linux == Linux ']'
++ sock_tool='ss -lntp4'
++ trap shut_down EXIT
++ trap onerror ERR
+ start_up
+ switch_to_test_dir
++ pwd
+ tpm2_test_original_cwd=/var/snap/cdts/180
++ mktemp -d /tmp/tpm2_test_XXXXXX
+ tpm2_test_cwd=/tmp/tpm2_test_bqMRUv
+ echo 'creating simulator working dir: /tmp/tpm2_test_bqMRUv'
+ pushd /tmp/tpm2_test_bqMRUv
creating simulator working dir: /tmp/tpm2_test_bqMRUv
/tmp/tpm2_test_bqMRUv /var/snap/cdts/180
++ pwd
Switched to CWD: /tmp/tpm2_test_bqMRUv
+ echo 'Switched to CWD: /tmp/tpm2_test_bqMRUv'
+ run_startup=true
+ export TPM2TOOLS_TCTI=device:/dev/tpmrm0
+ TPM2TOOLS_TCTI=device:/dev/tpmrm0
+ '[' true = true ']'
+ tpm2_startup -c
+ tpm2_clear
+ trap cleanup EXIT
+ cleanup no-shut-down
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context
++ local n=2
++ local value=keep-context
++ (( i=1 ))
++ (( i < 2 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 2 ))
++ echo 1
+ '[' 1 -ne 0 ']'
+ rm -f context.out
++ ina no-shut-down no-shut-down
++ local n=2
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 2 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ populate_hash_algs 'and alg != "keyedhash"'
++ populate_algs 'details['\''hash'\''] and not details['\''method'\''] and not details['\''symmetric'\''] and not details['\''signing'\''] and alg != "keyedhash"'
+++ mktemp
++ algs=/tmp/tmp.fERv3FX4JY
++ tpm2_getcap algorithms
++ filter_algs_by /tmp/tmp.fERv3FX4JY 'details['\''hash'\''] and not details['\''method'\''] and not details['\''symmetric'\''] and not details['\''signing'\''] and alg != "keyedhash"'
++ python3
++ rm /tmp/tmp.fERv3FX4JY
+ for gAlg in `populate_hash_algs 'and alg != "keyedhash"'`
+ for GAlg in rsa xor ecc aes
+ echo tpm2_createprimary -Q -g sha1 -G rsa -c context.out
+ tpm2_createprimary -Q -g sha1 -G rsa -c context.out
tpm2_createprimary -Q -g sha1 -G rsa -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C o -g sha1 -G rsa -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C e -g sha1 -G rsa -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C n -g sha1 -G rsa -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for GAlg in rsa xor ecc aes
+ echo tpm2_createprimary -Q -g sha1 -G xor -c context.out
+ tpm2_createprimary -Q -g sha1 -G xor -c context.out
tpm2_createprimary -Q -g sha1 -G xor -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C o -g sha1 -G xor -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C e -g sha1 -G xor -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C n -g sha1 -G xor -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for GAlg in rsa xor ecc aes
+ echo tpm2_createprimary -Q -g sha1 -G ecc -c context.out
+ tpm2_createprimary -Q -g sha1 -G ecc -c context.out
tpm2_createprimary -Q -g sha1 -G ecc -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C o -g sha1 -G ecc -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C e -g sha1 -G ecc -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C n -g sha1 -G ecc -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for GAlg in rsa xor ecc aes
+ echo tpm2_createprimary -Q -g sha1 -G aes -c context.out
+ tpm2_createprimary -Q -g sha1 -G aes -c context.out
tpm2_createprimary -Q -g sha1 -G aes -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C o -g sha1 -G aes -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C e -g sha1 -G aes -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C n -g sha1 -G aes -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for gAlg in `populate_hash_algs 'and alg != "keyedhash"'`
+ for GAlg in rsa xor ecc aes
+ echo tpm2_createprimary -Q -g sha256 -G rsa -c context.out
+ tpm2_createprimary -Q -g sha256 -G rsa -c context.out
tpm2_createprimary -Q -g sha256 -G rsa -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C o -g sha256 -G rsa -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C e -g sha256 -G rsa -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C n -g sha256 -G rsa -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for GAlg in rsa xor ecc aes
+ echo tpm2_createprimary -Q -g sha256 -G xor -c context.out
+ tpm2_createprimary -Q -g sha256 -G xor -c context.out
tpm2_createprimary -Q -g sha256 -G xor -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C o -g sha256 -G xor -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C e -g sha256 -G xor -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C n -g sha256 -G xor -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
tpm2_createprimary -Q -g sha256 -G ecc -c context.out
+ for GAlg in rsa xor ecc aes
+ echo tpm2_createprimary -Q -g sha256 -G ecc -c context.out
+ tpm2_createprimary -Q -g sha256 -G ecc -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C o -g sha256 -G ecc -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C e -g sha256 -G ecc -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C n -g sha256 -G ecc -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
tpm2_createprimary -Q -g sha256 -G aes -c context.out
++ return
+ '[' 0 -ne 0 ']'
+ for GAlg in rsa xor ecc aes
+ echo tpm2_createprimary -Q -g sha256 -G aes -c context.out
+ tpm2_createprimary -Q -g sha256 -G aes -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C o -g sha256 -G aes -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C e -g sha256 -G aes -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C n -g sha256 -G aes -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for gAlg in `populate_hash_algs 'and alg != "keyedhash"'`
+ for GAlg in rsa xor ecc aes
+ echo tpm2_createprimary -Q -g sha384 -G rsa -c context.out
+ tpm2_createprimary -Q -g sha384 -G rsa -c context.out
tpm2_createprimary -Q -g sha384 -G rsa -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C o -g sha384 -G rsa -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C e -g sha384 -G rsa -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C n -g sha384 -G rsa -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for GAlg in rsa xor ecc aes
+ echo tpm2_createprimary -Q -g sha384 -G xor -c context.out
+ tpm2_createprimary -Q -g sha384 -G xor -c context.out
tpm2_createprimary -Q -g sha384 -G xor -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C o -g sha384 -G xor -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C e -g sha384 -G xor -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C n -g sha384 -G xor -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
tpm2_createprimary -Q -g sha384 -G ecc -c context.out
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for GAlg in rsa xor ecc aes
+ echo tpm2_createprimary -Q -g sha384 -G ecc -c context.out
+ tpm2_createprimary -Q -g sha384 -G ecc -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C o -g sha384 -G ecc -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C e -g sha384 -G ecc -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C n -g sha384 -G ecc -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
tpm2_createprimary -Q -g sha384 -G aes -c context.out
+ for GAlg in rsa xor ecc aes
+ echo tpm2_createprimary -Q -g sha384 -G aes -c context.out
+ tpm2_createprimary -Q -g sha384 -G aes -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C o -g sha384 -G aes -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C e -g sha384 -G aes -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for Atype in o e n
+ tpm2_createprimary -Q -C n -g sha384 -G aes -c context.out
+ cleanup no-shut-down keep-context
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina no-shut-down keep-context keep-context
++ local n=3
++ local value=keep-context
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == keep-context ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' keep-context == keep-context ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina no-shut-down keep-context no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for gAlg in `populate_hash_algs 'and alg != "keyedhash"'`
+ for GAlg in rsa xor ecc aes
+ echo tpm2_createprimary -Q -g sm3_256 -G rsa -c context.out
+ tpm2_createprimary -Q -g sm3_256 -G rsa -c context.out
tpm2_createprimary -Q -g sm3_256 -G rsa -c context.out
ERROR:esys_crypto:src/tss2-esys/esys_crypto_ossl.c:103:iesys_cryptossl_hash_start() ErrorCode (0x00070002) Unsupported hash algorithm (18)
ERROR:esys:src/tss2-esys/esys_iutil.c:1493:iesys_get_name() crypto hash start ErrorCode (0x00070002)
ERROR:esys:src/tss2-esys/api/Esys_CreatePrimary.c:426:Esys_CreatePrimary_Finish() ErrorCode (0x00070011) in Public name not equal name in response
ERROR:esys:src/tss2-esys/api/Esys_CreatePrimary.c:135:Esys_CreatePrimary() Esys Finish ErrorCode (0x00070011)
ERROR: Esys_CreatePrimary(0x70011) - esapi:Response is malformed
ERROR:esys:src/tss2-esys/esys_iutil.c:1134:iesys_check_sequence_async() Esys called in bad sequence.
ERROR:esys:src/tss2-esys/api/Esys_FlushContext.c:66:Esys_FlushContext() Error in async function ErrorCode (0x00070007)
ERROR: Esys_FlushContext(0x70007) - esapi:Function called in the wrong order
ERROR: Unable to run tpm2_createprimary
++ onerror
++ echo 'tpm2_createprimary -Q -g $gAlg -G $GAlg -c context.out on line 28 failed: 1'
tpm2_createprimary -Q -g $gAlg -G $GAlg -c context.out on line 28 failed: 1
++ exit 1
+ cleanup
+ rm -f policy.bin obj.pub pub.out primary.ctx
++ ina keep-context
++ local n=1
++ local value=keep-context
++ (( i=1 ))
++ (( i < 1 ))
++ echo 1
+ '[' 1 -ne 0 ']'
+ rm -f context.out
++ ina no-shut-down
++ local n=1
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 1 ))
++ echo 1
+ '[' 1 -ne 0 ']'
+ shut_down
+ switch_back_from_test_dir
+ popd
+ fail=0
+ '[' -n '' ']'
+ tpm2_abrmd_pid=
+ '[' -n '' ']'
+ tpm2_sim_pid=
+ rm -rf /tmp/tpm2_test_bqMRUv
/var/snap/cdts/180
+ '[' 0 -ne 0 ']'
========================================

========================================
tpm2_import fail
========================================
+ source helpers.sh
++ set -E
++ tpm2_test_original_cwd=
++ tpm2_test_cwd=
++ tpm2_sim_pid=
++ tpm2_abrmd_pid=
++ tpm2_tcti_opts=
++ tpm2tools_tcti=
++ sock_tool=unknown
+++ uname
++ OS=Linux
++ '[' Linux == Linux ']'
++ sock_tool='ss -lntp4'
++ trap shut_down EXIT
++ trap onerror ERR
+ trap cleanup EXIT
+ start_up
+ switch_to_test_dir
++ pwd
+ tpm2_test_original_cwd=/var/snap/cdts/180
++ mktemp -d /tmp/tpm2_test_XXXXXX
+ tpm2_test_cwd=/tmp/tpm2_test_X2iP6U
+ echo 'creating simulator working dir: /tmp/tpm2_test_X2iP6U'
+ pushd /tmp/tpm2_test_X2iP6U
creating simulator working dir: /tmp/tpm2_test_X2iP6U
/tmp/tpm2_test_X2iP6U /var/snap/cdts/180
++ pwd
+ echo 'Switched to CWD: /tmp/tpm2_test_X2iP6U'
Switched to CWD: /tmp/tpm2_test_X2iP6U
+ run_startup=true
+ export TPM2TOOLS_TCTI=device:/dev/tpmrm0
+ TPM2TOOLS_TCTI=device:/dev/tpmrm0
+ '[' true = true ']'
+ tpm2_startup -c
+ tpm2_clear
+ parent_algs=("rsa2048:aes128cfb" "rsa2048:aes256cfb" "ecc256:aes128cfb")
++ populate_hash_algs 'and alg != "sha1"'
++ populate_algs 'details['\''hash'\''] and not details['\''method'\''] and not details['\''symmetric'\''] and not details['\''signing'\''] and alg != "sha1"'
+++ mktemp
++ algs=/tmp/tmp.qxwTcyDC3l
++ tpm2_getcap algorithms
++ filter_algs_by /tmp/tmp.qxwTcyDC3l 'details['\''hash'\''] and not details['\''method'\''] and not details['\''symmetric'\''] and not details['\''signing'\''] and alg != "sha1"'
++ python3
++ rm /tmp/tmp.qxwTcyDC3l
+ halgs='sha256
sha384
sm3_256'
+ echo 'halgs: sha256
sha384
sm3_256'
halgs: sha256
sha384
sm3_256
+ for pa in "${parent_algs[@]}"
+ for name in $halgs
+ is_alg_supported rsa2048:aes128cfb
+ tpm2_testparms rsa2048:aes128cfb
+ return 0
rsa2048:aes128cfb - sha256
+ echo 'rsa2048:aes128cfb - sha256'
+ run_test rsa2048:aes128cfb sha256
+ cleanup no-shut-down
+ rm -f import_key.ctx import_key.name import_key.priv import_key.pub parent.ctx plain.dec.ssl plain.enc plain.txt sym.key import_rsa_key.pub import_rsa_key.priv import_rsa_key.ctx import_rsa_key.name private.pem public.pem plain.rsa.enc plain.rsa.dec public.pem data.in.raw data.in.digest data.out.signed ticket.out ecc.pub ecc.priv ecc.name ecc.ctx private.ecc.pem public.ecc.pem passfile aes.key policy.dat aes.priv aes.pub
+ tpm2_flushcontext -s
+ '[' no-shut-down '!=' no-shut-down ']'
+ parent_alg=rsa2048:aes128cfb
+ name_alg=sha256
+ tpm2_createprimary -Q -G rsa2048:aes128cfb -g sha256 -C o -c parent.ctx
+ is_alg_supported aes128
+ tpm2_testparms aes128
+ return 0
+ run_aes_import_test parent.ctx aes-128-cfb 16
+ dd if=/dev/urandom of=sym.key bs=1 count=16
+ echo 'tpm2_import -Q -G aes -g sha256 -i sym.key -C parent.ctx -u import_key.pub -r import_key.priv'
+ tpm2_import -Q -G aes -g sha256 -i sym.key -C parent.ctx -u import_key.pub -r import_key.priv
tpm2_import -Q -G aes -g sha256 -i sym.key -C parent.ctx -u import_key.pub -r import_key.priv
+ tpm2_load -Q -C parent.ctx -u import_key.pub -r import_key.priv -n import_key.name -c import_key.ctx
+ echo plaintext
+ is_cmd_supported EncryptDecrypt
+ tpm2_getcap commands
+ grep -i EncryptDecrypt:
+ return 0
+ tpm2_encryptdecrypt -c import_key.ctx -o plain.enc plain.txt
WARN: Using a weak IV, try specifying an IV
++ xxd -c 256 -p sym.key
+ openssl enc -in plain.enc -out plain.dec.ssl -d -K 9e3ddb42a58a23325e7a0aacd42b8520 -iv 0 -aes-128-cfb
hex string is too short, padding with zero bytes to length
+ diff plain.txt plain.dec.ssl
+ rm import_key.ctx
+ is_alg_supported aes256
+ tpm2_testparms aes256
+ return 0
+ run_aes_import_test parent.ctx aes-256-cfb 32
+ dd if=/dev/urandom of=sym.key bs=1 count=32
+ echo 'tpm2_import -Q -G aes -g sha256 -i sym.key -C parent.ctx -u import_key.pub -r import_key.priv'
+ tpm2_import -Q -G aes -g sha256 -i sym.key -C parent.ctx -u import_key.pub -r import_key.priv
tpm2_import -Q -G aes -g sha256 -i sym.key -C parent.ctx -u import_key.pub -r import_key.priv
+ tpm2_load -Q -C parent.ctx -u import_key.pub -r import_key.priv -n import_key.name -c import_key.ctx
+ echo plaintext
+ is_cmd_supported EncryptDecrypt
+ tpm2_getcap commands
+ grep -i EncryptDecrypt:
+ return 0
+ tpm2_encryptdecrypt -c import_key.ctx -o plain.enc plain.txt
WARN: Using a weak IV, try specifying an IV
++ xxd -c 256 -p sym.key
+ openssl enc -in plain.enc -out plain.dec.ssl -d -K 570fdee788c7b79b15842d760bcbc50967054364bf717307512eae78c73a1911 -iv 0 -aes-256-cfb
hex string is too short, padding with zero bytes to length
+ diff plain.txt plain.dec.ssl
+ rm import_key.ctx
+ run_rsa_import_test parent.ctx 1024
+ openssl genrsa -out private.pem 1024
Generating RSA private key, 1024 bit long modulus (2 primes)
..............................+++++
..............+++++
e is 65537 (0x010001)
+ openssl rsa -in private.pem -pubout
writing RSA key
+ tpm2_import -Q -G rsa -g sha256 -i private.pem -C parent.ctx -u import_rsa_key.pub -r import_rsa_key.priv
WARNING:esys:src/tss2-esys/api/Esys_Import.c:319:Esys_Import_Finish() Received TPM Error
ERROR:esys:src/tss2-esys/api/Esys_Import.c:110:Esys_Import() Esys Finish ErrorCode (0x000002c4)
ERROR: Esys_HMAC(0x2C4) - tpm:parameter(2):value is out of range or is not correct for the context
ERROR: Unable to run tpm2_import
++ onerror
++ echo 'tpm2_import -Q -G rsa -g "$name_alg" -i private.pem -C $1 -u import_rsa_key.pub -r import_rsa_key.priv on line 68 failed: 1'
tpm2_import -Q -G rsa -g "$name_alg" -i private.pem -C $1 -u import_rsa_key.pub -r import_rsa_key.priv on line 68 failed: 1
++ exit 1
+ cleanup
+ rm -f import_key.ctx import_key.name import_key.priv import_key.pub parent.ctx plain.dec.ssl plain.enc plain.txt sym.key import_rsa_key.pub import_rsa_key.priv import_rsa_key.ctx import_rsa_key.name private.pem public.pem plain.rsa.enc plain.rsa.dec public.pem data.in.raw data.in.digest data.out.signed ticket.out ecc.pub ecc.priv ecc.name ecc.ctx private.ecc.pem public.ecc.pem passfile aes.key policy.dat aes.priv aes.pub
+ tpm2_flushcontext -s
+ '[' '' '!=' no-shut-down ']'
+ shut_down
+ switch_back_from_test_dir
+ popd
+ fail=0
+ '[' -n '' ']'
+ tpm2_abrmd_pid=
+ '[' -n '' ']'
+ tpm2_sim_pid=
+ rm -rf /tmp/tpm2_test_X2iP6U
/var/snap/cdts/180
+ '[' 0 -ne 0 ']'
========================================

========================================
tpm2_loadexternal fail
========================================
+ source helpers.sh
++ set -E
++ tpm2_test_original_cwd=
++ tpm2_test_cwd=
++ tpm2_sim_pid=
++ tpm2_abrmd_pid=
++ tpm2_tcti_opts=
++ tpm2tools_tcti=
++ sock_tool=unknown
+++ uname
++ OS=Linux
++ '[' Linux == Linux ']'
++ sock_tool='ss -lntp4'
++ trap shut_down EXIT
++ trap onerror ERR
+ alg_primary_obj=sha256
+ alg_primary_key=rsa
+ alg_create_obj=sha256
+ alg_create_key=hmac
+ file_primary_key_ctx=context.p_sha256_rsa
+ file_loadexternal_key_pub=opu_sha256_hmac
+ file_loadexternal_key_priv=opr_sha256_hmac
+ file_loadexternal_key_name=name.loadexternal_sha256_rsa-sha256_hmac
+ file_loadexternal_key_ctx=ctx_loadexternal_out_sha256_rsa-sha256_hmac
+ file_loadexternal_output=loadexternal_ctx_loadexternal_out_sha256_rsa-sha256_hmac
+ Handle_parent=0x81010019
+ trap cleanup EXIT
+ start_up
+ switch_to_test_dir
++ pwd
+ tpm2_test_original_cwd=/var/snap/cdts/180
++ mktemp -d /tmp/tpm2_test_XXXXXX
+ tpm2_test_cwd=/tmp/tpm2_test_JPhbAa
+ echo 'creating simulator working dir: /tmp/tpm2_test_JPhbAa'
creating simulator working dir: /tmp/tpm2_test_JPhbAa
+ pushd /tmp/tpm2_test_JPhbAa
/tmp/tpm2_test_JPhbAa /var/snap/cdts/180
++ pwd
+ echo 'Switched to CWD: /tmp/tpm2_test_JPhbAa'
Switched to CWD: /tmp/tpm2_test_JPhbAa
+ run_startup=true
+ export TPM2TOOLS_TCTI=device:/dev/tpmrm0
+ TPM2TOOLS_TCTI=device:/dev/tpmrm0
+ '[' true = true ']'
+ tpm2_startup -c
+ tpm2_clear
+ cleanup no-shut-down
+ rm -f context.p_sha256_rsa opu_sha256_hmac opr_sha256_hmac name.loadexternal_sha256_rsa-sha256_hmac ctx_loadexternal_out_sha256_rsa-sha256_hmac loadexternal_ctx_loadexternal_out_sha256_rsa-sha256_hmac private.pem public.pem plain.txt plain.rsa.dec key.ctx public.ecc.pem private.ecc.pem data.in.digest data.out.signed ticket.out name.bin stdout.yaml passfile private.pem
++ ina no-shut-down keep_handle
++ local n=2
++ local value=keep_handle
++ (( i=1 ))
++ (( i < 2 ))
++ '[' no-shut-down == keep_handle ']'
++ (( i++ ))
++ (( i < 2 ))
++ echo 1
+ '[' 1 -ne 0 ']'
+ tpm2_evictcontrol -Q -Co -c 0x81010019
+ true
++ ina no-shut-down no-shut-down
++ local n=2
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 2 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ tpm2_clear
+ run_tss_test
+ tpm2_createprimary -Q -C e -g sha256 -G rsa -c context.p_sha256_rsa
+ tpm2_create -Q -g sha256 -G hmac -u opu_sha256_hmac -r opr_sha256_hmac -C context.p_sha256_rsa
+ tpm2_loadexternal -Q -C n -u opu_sha256_hmac -c ctx_loadexternal_out_sha256_rsa-sha256_hmac
+ tpm2_evictcontrol -Q -C o -c context.p_sha256_rsa 0x81010019
+ cleanup keep_handle no-shut-down
+ rm -f context.p_sha256_rsa opu_sha256_hmac opr_sha256_hmac name.loadexternal_sha256_rsa-sha256_hmac ctx_loadexternal_out_sha256_rsa-sha256_hmac loadexternal_ctx_loadexternal_out_sha256_rsa-sha256_hmac private.pem public.pem plain.txt plain.rsa.dec key.ctx public.ecc.pem private.ecc.pem data.in.digest data.out.signed ticket.out name.bin stdout.yaml passfile private.pem
++ ina keep_handle no-shut-down keep_handle
++ local n=3
++ local value=keep_handle
++ (( i=1 ))
++ (( i < 3 ))
++ '[' keep_handle == keep_handle ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina keep_handle no-shut-down no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' keep_handle == no-shut-down ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ tpm2_create -Q -C 0x81010019 -g sha256 -G hmac -u opu_sha256_hmac -r opr_sha256_hmac
+ tpm2_loadexternal -Q -C n -u opu_sha256_hmac -c ctx_loadexternal_out_sha256_rsa-sha256_hmac
+ cleanup keep_handle no-shut-down
+ rm -f context.p_sha256_rsa opu_sha256_hmac opr_sha256_hmac name.loadexternal_sha256_rsa-sha256_hmac ctx_loadexternal_out_sha256_rsa-sha256_hmac loadexternal_ctx_loadexternal_out_sha256_rsa-sha256_hmac private.pem public.pem plain.txt plain.rsa.dec key.ctx public.ecc.pem private.ecc.pem data.in.digest data.out.signed ticket.out name.bin stdout.yaml passfile private.pem
++ ina keep_handle no-shut-down keep_handle
++ local n=3
++ local value=keep_handle
++ (( i=1 ))
++ (( i < 3 ))
++ '[' keep_handle == keep_handle ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
++ ina keep_handle no-shut-down no-shut-down
++ local n=3
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 3 ))
++ '[' keep_handle == no-shut-down ']'
++ (( i++ ))
++ (( i < 3 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ tpm2_create -Q -C 0x81010019 -g sha256 -G hmac -u opu_sha256_hmac -r opr_sha256_hmac
+ tpm2_loadexternal -Q -u opu_sha256_hmac -c ctx_loadexternal_out_sha256_rsa-sha256_hmac
+ cleanup no-shut-down
+ rm -f context.p_sha256_rsa opu_sha256_hmac opr_sha256_hmac name.loadexternal_sha256_rsa-sha256_hmac ctx_loadexternal_out_sha256_rsa-sha256_hmac loadexternal_ctx_loadexternal_out_sha256_rsa-sha256_hmac private.pem public.pem plain.txt plain.rsa.dec key.ctx public.ecc.pem private.ecc.pem data.in.digest data.out.signed ticket.out name.bin stdout.yaml passfile private.pem
++ ina no-shut-down keep_handle
++ local n=2
++ local value=keep_handle
++ (( i=1 ))
++ (( i < 2 ))
++ '[' no-shut-down == keep_handle ']'
++ (( i++ ))
++ (( i < 2 ))
++ echo 1
+ '[' 1 -ne 0 ']'
+ tpm2_evictcontrol -Q -Co -c 0x81010019
++ ina no-shut-down no-shut-down
++ local n=2
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 2 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ for len in "1024 2048"
+ is_alg_supported 'rsa1024 2048'
+ tpm2_testparms rsa1024 2048
+ is_simulator
+ tpm2_getcap properties-fixed
+ grep -zP 'TPM2_PT_VENDOR_STRING_1:\s*raw: 0x53572020'
+ echo 'SKIP: Testing on a non-simulator TPM. Skipping unsupported algorithm rsa1024 2048'
+ return 1
+ for len in "128 256"
+ is_alg_supported 'aes128 256'
+ tpm2_testparms aes128 256
SKIP: Testing on a non-simulator TPM. Skipping unsupported algorithm rsa1024 2048
+ return 0
+ run_aes_test 128 256
+ dd if=/dev/urandom of=sym.key bs=1 count=16
+ tpm2_loadexternal -G aes -r sym.key -n name.bin -c key.ctx
++ yaml_get_kv stdout.yaml name
++ third_arg=
++ '[' 2 -eq 3 ']'
++ python3
+ local name1=000b84e352f05b83647d56f5b6980b0dd81f729ca095310f2835f7b75222d8a7dc2b
++ xxd -c 256 -p name.bin
+ local name2=000b84e352f05b83647d56f5b6980b0dd81f729ca095310f2835f7b75222d8a7dc2b
+ test 000b84e352f05b83647d56f5b6980b0dd81f729ca095310f2835f7b75222d8a7dc2b == 000b84e352f05b83647d56f5b6980b0dd81f729ca095310f2835f7b75222d8a7dc2b
+ echo plaintext
+ is_cmd_supported EncryptDecrypt
+ tpm2_getcap commands
+ grep -i EncryptDecrypt:
+ return 0
+ tpm2_encryptdecrypt -c key.ctx -o plain.enc plain.txt
WARN: Using a weak IV, try specifying an IV
++ xxd -c 256 -p sym.key
+ openssl enc -in plain.enc -out plain.dec.ssl -d -K ba9b5a253d96330c1ea7ffb11155dce6 -iv 0 -aes-128-cfb
hex string is too short, padding with zero bytes to length
+ diff plain.txt plain.dec.ssl
+ cleanup no-shut-down
+ rm -f context.p_sha256_rsa opu_sha256_hmac opr_sha256_hmac name.loadexternal_sha256_rsa-sha256_hmac ctx_loadexternal_out_sha256_rsa-sha256_hmac loadexternal_ctx_loadexternal_out_sha256_rsa-sha256_hmac private.pem public.pem plain.txt plain.rsa.dec key.ctx public.ecc.pem private.ecc.pem data.in.digest data.out.signed ticket.out name.bin stdout.yaml passfile private.pem
++ ina no-shut-down keep_handle
++ local n=2
++ local value=keep_handle
++ (( i=1 ))
++ (( i < 2 ))
++ '[' no-shut-down == keep_handle ']'
++ (( i++ ))
++ (( i < 2 ))
++ echo 1
+ '[' 1 -ne 0 ']'
+ tpm2_evictcontrol -Q -Co -c 0x81010019
+ true
++ ina no-shut-down no-shut-down
++ local n=2
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 2 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ is_alg_supported ecc256
+ tpm2_testparms ecc256
+ return 0
+ run_ecc_test prime256v1
+ openssl ecparam -name prime256v1 -genkey -noout -out private.ecc.pem
+ openssl ec -in private.ecc.pem -out public.ecc.pem -pubout
read EC key
writing EC key
+ echo 'data to sign'
+ shasum -a 256 data.in.raw
+ awk '{ print "000000 " $1 }'
+ xxd -r -c 32
+ tpm2_loadexternal -Q -G ecc -r private.ecc.pem -c key.ctx
+ tpm2_sign -Q -c key.ctx -g sha256 -d -f plain -o data.out.signed data.in.digest
+ openssl dgst -verify public.ecc.pem -keyform pem -sha256 -signature data.out.signed data.in.raw
Verified OK
+ tpm2_loadexternal -Q -G ecc -u public.ecc.pem -c key.ctx
+ openssl dgst -sha256 -sign private.ecc.pem -out data.out.signed data.in.raw
+ tpm2_verifysignature -Q -c key.ctx -g sha256 -m data.in.raw -f ecdsa -s data.out.signed
+ cleanup no-shut-down
+ rm -f context.p_sha256_rsa opu_sha256_hmac opr_sha256_hmac name.loadexternal_sha256_rsa-sha256_hmac ctx_loadexternal_out_sha256_rsa-sha256_hmac loadexternal_ctx_loadexternal_out_sha256_rsa-sha256_hmac private.pem public.pem plain.txt plain.rsa.dec key.ctx public.ecc.pem private.ecc.pem data.in.digest data.out.signed ticket.out name.bin stdout.yaml passfile private.pem
++ ina no-shut-down keep_handle
++ local n=2
++ local value=keep_handle
++ (( i=1 ))
++ (( i < 2 ))
++ '[' no-shut-down == keep_handle ']'
++ (( i++ ))
++ (( i < 2 ))
++ echo 1
+ '[' 1 -ne 0 ']'
+ tpm2_evictcontrol -Q -Co -c 0x81010019
+ true
++ ina no-shut-down no-shut-down
++ local n=2
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 2 ))
++ '[' no-shut-down == no-shut-down ']'
++ echo 0
++ return
+ '[' 0 -ne 0 ']'
+ run_rsa_passin_test private.pem pass:mypassword
+ openssl genrsa -aes128 -passout pass:mypassword -out private.pem 1024
Generating RSA private key, 1024 bit long modulus (2 primes)
........+++++
..............+++++
e is 65537 (0x010001)
+ '[' pass:mypassword '!=' stdin ']'
+ cmd='tpm2_loadexternal -Q -G rsa -r private.pem -c key.ctx --passin pass:mypassword'
+ eval tpm2_loadexternal -Q -G rsa -r private.pem -c key.ctx --passin pass:mypassword
++ tpm2_loadexternal -Q -G rsa -r private.pem -c key.ctx --passin pass:mypassword
WARNING:esys:src/tss2-esys/api/Esys_LoadExternal.c:304:Esys_LoadExternal_Finish() Received TPM Error
ERROR:esys:src/tss2-esys/api/Esys_LoadExternal.c:108:Esys_LoadExternal() Esys Finish ErrorCode (0x000002c4)
ERROR: Esys_LoadExternal(0x2C4) - tpm:parameter(2):value is out of range or is not correct for the context
ERROR: Unable to run tpm2_loadexternal
+++ onerror
+++ echo 'tpm2_loadexternal -Q -G rsa -r private.pem -c key.ctx --passin pass:mypassword on line 197 failed: 1'
+++ exit 1
+ cleanup
+ rm -f context.p_sha256_rsa opu_sha256_hmac opr_sha256_hmac name.loadexternal_sha256_rsa-sha256_hmac ctx_loadexternal_out_sha256_rsa-sha256_hmac loadexternal_ctx_loadexternal_out_sha256_rsa-sha256_hmac private.pem public.pem plain.txt plain.rsa.dec key.ctx public.ecc.pem private.ecc.pem data.in.digest data.out.signed ticket.out name.bin stdout.yaml passfile private.pem
tpm2_loadexternal -Q -G rsa -r private.pem -c key.ctx --passin pass:mypassword on line 197 failed: 1
++ ina keep_handle
++ local n=1
++ local value=keep_handle
++ (( i=1 ))
++ (( i < 1 ))
++ echo 1
+ '[' 1 -ne 0 ']'
+ tpm2_evictcontrol -Q -Co -c 0x81010019
+ true
++ ina no-shut-down
++ local n=1
++ local value=no-shut-down
++ (( i=1 ))
++ (( i < 1 ))
++ echo 1
+ '[' 1 -ne 0 ']'
+ shut_down
+ switch_back_from_test_dir
+ popd
/var/snap/cdts/180
+ fail=0
+ '[' -n '' ']'
+ tpm2_abrmd_pid=
+ '[' -n '' ']'
+ tpm2_sim_pid=
+ rm -rf /tmp/tpm2_test_JPhbAa
+ '[' 0 -ne 0 ']'
========================================

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Maybe the same as Bug #1936899

... the failure seems from RSA private key 1024 bit no support for this platform. So TPM returned ErrorCode (0x000002c4), "value is out of range or is not correct for the context" ...

Can you help with this problem?

Provide an answer of your own, or ask Allumallu Susmitha for more information if necessary.

To post a message you must log in.