函数逻辑报告 |
Source Code:security\keys\trusted-keys\trusted_tpm1.c |
Create Date:2022-07-27 20:05:12 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:an have zero or more token= options
函数原型:static int getoptions(char *c, struct trusted_key_payload *pay, struct trusted_key_options *opt)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| char * | c | |
| struct trusted_key_payload * | pay | |
| struct trusted_key_options * | opt |
| 740 | token_mask等于0 |
| 745 | tpm2等于tpm_is_tpm2(chip) |
| 749 | hash等于如果tpm2则HASH_ALGO_SHA256否则HASH_ALGO_SHA1 |
| 754 | token等于match_token(p, key_tokens, args) |
| 755 | 如果st_and_set_bit - Set a bit and return its old value*@nr: Bit to set*@addr: Address to count from* This is an atomic fully-ordered operation (implied full memory barrier).则返回:负EINVAL |
| 759 | 当:token恒等于Opt_pcrinfo |
| 768 | 当:token恒等于Opt_keyhandle |
| 772 | keytype等于SEAL_keytype |
| 774 | 退出 |
| 775 | 当:token恒等于Opt_keyauth |
| 776 | 如果strlen - Find the length of a string*@s: The string to be sized不等于2乘SHA1_DIGEST_SIZE则返回:负EINVAL |
| 778 | res等于 二进制表示ASCII码的十六进制字符串 |
| 782 | 退出 |
| 783 | 当:token恒等于Opt_blobauth |
| 784 | 如果strlen - Find the length of a string*@s: The string to be sized不等于2乘SHA1_DIGEST_SIZE则返回:负EINVAL |
| 786 | res等于 二进制表示ASCII码的十六进制字符串 |
| 790 | 退出 |
| 791 | 当:token恒等于Opt_migratable |
| 797 | 当:token恒等于Opt_pcrlock |
| 802 | 退出 |
| 804 | 如果st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from则返回:负EINVAL |
| 806 | 以i小于HASH_ALGO__LAST循环 |
| 812 | 如果i恒等于HASH_ALGO__LAST则返回:负EINVAL |
| 814 | 如果非tpm2且i不等于HASH_ALGO_SHA1则 |
| 818 | 退出 |
| 819 | 当:token恒等于Opt_policydigest |
| 820 | digest_len等于hash_digest_size[hash] |
| 821 | 如果非tpm2或strlen - Find the length of a string*@s: The string to be sized不等于2乘digest_len则返回:负EINVAL |
| 823 | res等于 二进制表示ASCII码的十六进制字符串 |
| 828 | 退出 |
| 829 | 当:token恒等于Opt_policyhandle |
| 835 | policyhandle等于handle |
| 836 | 退出 |
| 837 | 默认 |
| 838 | 返回:负EINVAL |
| 841 | 返回:0 |
| 名称 | 描述 |
|---|---|
| datablob_parse | datablob_parse - parse the keyctl data and fill in the* payload and options structures* On success returns 0, otherwise -EINVAL. |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |