函数逻辑报告 |
Source Code:security\keys\trusted-keys\trusted_tpm1.c |
Create Date:2022-07-27 20:05:31 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:rusted_instantiate - create a new trusted key* Unseal an existing trusted blob or, for a new key, get a* random key, then seal and create a trusted key-type key,* adding it to the specified keyring.* On success, return 0. Otherwise return errno.
函数原型:static int trusted_instantiate(struct key *key, struct key_preparsed_payload *prep)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct key * | key | |
| struct key_preparsed_payload * | prep |
| 955 | struct trusted_key_payload * payload = NULL |
| 956 | struct trusted_key_options * options = NULL |
| 957 | datalen等于Raw datalen |
| 959 | ret等于0 |
| 964 | tpm2等于tpm_is_tpm2(chip) |
| 977 | options等于trusted_options_alloc() |
| 978 | 如果非options则 |
| 982 | payload等于trusted_payload_alloc(key) |
| 983 | 如果非payload则 |
| 988 | key_cmd等于datablob_parse - parse the keyctl data and fill in the* payload and options structures* On success returns 0, otherwise -EINVAL. |
| 989 | 如果key_cmd小于0则 |
| 994 | 如果非keyhandle则 |
| 999 | dump_payload(payload) |
| 1000 | dump_options(options) |
| 1015 | ret等于tpm_get_random(chip, key, key_len) |
| 1026 | 退出 |
| 1027 | 默认 |
| 1031 | 如果非ret且pcrlock则ret等于Lock a trusted key, by extending a selected PCR.* Prevents a trusted key that is sealed to PCRs from being accessed.* This uses the tpm driver's extend function. |
| 1033 | out : |
| 1036 | 如果非ret则rcu_assign_keypointer(key, payload) |
| 1040 | 返回:ret |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |