Environment
- Device: reComputer Industrial Orin J401
- JetPack: 6.2.2 (L4T R36.5.0)
- OP-TEE: fTPM feature enabled
Issue Summary
fTPM device provisioning fails with “Invalid provision mode!” error when running ftpm_device_provision.sh. The TEEC_InvokeCommand returns error code 0xffff000a origin 0x4.
Steps Taken
- In addition to the procedure being carried out in Topic367455,
I performed the following steps to enable the fTPM EK verification function: - Re-flashed the device
- After boot, executed the fTPM provisioning script
Expected vs Actual Behavior
Expected:
fTPM provisioning completes successfully with both RSA and ECC EK certificates created.
Actual:
- Provisioning fails with “Invalid provision mode!”
- Only RSA_EK_HANDLE (0x81010001) is registered
- ECC_EK_HANDLE (0x81010002) is not registered
Error Output
Provisioning script error:
root@test-desktop:/home/test/Documents/ftpm_prov# sudo ./ftpm_device_provision.sh -r ek_cert_rsa.der -e ek_cert_ec.der -p owner
[fTPM device]: === fTPM device provisioning ===
[fTPM device]: === Extracting the EK Certs from EKB ===
ca_query_prov_mode: TEEC_InvokeCommand failed 0xffff000a origin 0x4
Invalid provision mode!
Could not open file or uri for loading certificate from ek_cert_rsa.der
2030B0A5FFFF0000:error:16000069:STORE routines:ossl_store_get0_loader_int:unregistered scheme:../crypto/store/store_register.c:237:scheme=file
2030B0A5FFFF0000:error:80000002:system library:file_open:No such file or directory:../providers/implementations/storemgmt/file_store.c:267:calling stat(ek_cert_rsa.der)
Unable to load certificate
[ftpm device]: fTPM provisioning failed.
Current TPM State
After the failed provisioning attempt, I verified the TPM state:
Summary:
- ✅ RSA_EK_HANDLE (0x81010001): Present and functional
- ❌ ECC_EK_HANDLE (0x81010002): Not registered
- ❌ No NV indices found
Checking TPM handles:
root@test-desktop:~# tpm2_getcap handles-persistent -T device:/dev/tpmrm0
- 0x81010001
root@test-desktop:~# tpm2_getcap handles-nv-index -T device:/dev/tpmrm0
root@test-desktop:~#
RSA EK public key details:
root@test-desktop:~# tpm2_readpublic -c 0x81010001 -f pem -o ekPub.pem
name: 000b3182143e9809d9af4bae757ba0e62fe29dec069fcd0c1288386f204c90491703
qualified name: 000b71e8069ad0efaebb07333d567bb6e75fbe7f3863ba698e4eae6826d7aa151118
name-alg:
value: sha256
raw: 0xb
attributes:
value: fixedtpm|fixedparent|sensitivedataorigin|adminwithpolicy|restricted|decrypt
raw: 0x300b2
type:
value: rsa
raw: 0x1
exponent: 65537
bits: 2048
scheme:
value: null
raw: 0x10
scheme-halg:
value: (null)
raw: 0x0
sym-alg:
value: aes
raw: 0x6
sym-mode:
value: cfb
raw: 0x43
sym-keybits: 128
rsa: c2f0f7464e4659adf2e1aee8e533bc9da7e90958800be5ec7f832106c7540b3f5a4a07fd1c4535e331615f97eec3b979cfc2b4251e7670e0f3d2bba2a94001fd796c2d525556c33125bc691c19879100aed00fbc7f78b959e85abba520a4fde99079069454e56e4f72d6b7396f50bf9a2df964c258c9d38b257895f5c99136260bc6d1cf54db7fa2520ea29fad12ca96349ca808e2195afdb72dda44acbade92d5d588ac2bb7833c1438c3c82d68ff76cb92c96c016966a6dc37ad067faebe67589e6414eaca38576f27383e45116c70df20c33f906a1a3e65c5096f75287e7388058ded1bec0cafefc6db85c355dd4caa69e5bd3b6927a984215e69b95869b5
authorization policy: 837197674484b3f81a90cc8d46a5d724fd52d76e06520b64f2a1da1b331469aa
Exported public key:
root@test-desktop:~# cat ekPub.pem
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwvD3Rk5GWa3y4a7o5TO8
nafpCViAC+Xsf4MhBsdUCz9aSgf9HEU14zFhX5fuw7l5z8K0JR52cODz0ruiqUAB
/XlsLVJVVsMxJbxpHBmHkQCu0A+8f3i5Wehau6UgpP3pkHkGlFTlbk9y1rc5b1C/
mi35ZMJYydOLJXiV9cmRNiYLxtHPVNt/olIOop+tEsqWNJyoCOIZWv23LdpErLre
ktXViKwrt4M8FDjDyC1o/3bLkslsAWlmptw3rQZ/rr5nWJ5kFOrKOFdvJzg+RRFs
cN8gwz+Qaho+ZcUJb3UofnOIBY3tG+wMr+/G24XDVd1MqmnlvTtpJ6mEIV5puVhp
tQIDAQAB
-----END PUBLIC KEY-----
root@test-desktop:~#
Questions
- What does the “Invalid provision mode!” error indicate, and how can I resolve it?
- Why is the ECC_EK_HANDLE (0x81010002) missing after flashing?
- Are there any missing prerequisites or configuration steps?
Any insights would be greatly appreciated!