一、组件联调准备
1. 运行TPM模拟器
~/TPM/ibmtpm/ibmtpm$ ./src/tpm_server
LIBRARY_COMPATIBILITY_CHECK is ON
Starting ACT thread...
TPM command server listening on port 2321
Platform server listening on port 2322
2. 运行tpm2-abrmd
~/TPM/abrmd/tpm2-abrmd$ sudo /usr/local/sbin/tpm2-abrmd --allow-root --tcti=mssim
3. 运行tpm2-tools
~/TPM/tools/tpm2-tools$ su -
密码:
root [ ~ ]# tpm2_getrandom 4
^Vroot [ ~ ]# tpm2_getrandom 4
�b~�root [ ~ ]#
二、API实例及解析
以下部分内容引自: