接前一篇文章:tpm2-tools源码分析之tpm2_load.c(3)
前一篇文章讲到了tpm2_load.c中的tpm2_tool_onrun函数,分析完了第1个函数check_options。本文分析第2个函数process_inputs。
process_inputs的源码如下:
static tool_rc process_inputs(ESYS_CONTEXT *ectx) {
UNUSED(ectx);
/*
* 1. Object and auth initializations
*/
/*
* 1.a Add the new-auth values to be set for the object.
*/
/*
* 1.b Add object names and their auth sessions
*/
/*
* If a TSS PEM file has been specified, we try to load the tssprivkey
* specified with -r, --private option and parse the parent information
* from the TSS PEM file.
*/
const char