函数逻辑报告 |
Source Code:security\keys\trusted-keys\trusted_tpm1.c |
Create Date:2022-07-27 20:04:34 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Create an object specific authorisation protocol (OSAP) session
函数原型:static int osap(struct tpm_buf *tb, struct osapsess *s, const unsigned char *key, uint16_t type, uint32_t handle)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct tpm_buf * | tb | |
struct osapsess * | s | |
const unsigned char * | key | |
uint16_t | type | |
uint32_t | handle |
405 | ret等于tpm_get_random(chip, ononce, TPM_NONCE_SIZE) |
406 | 如果ret不等于TPM_NONCE_SIZE则返回:ret |
409 | tpm_buf_reset(tb, Command TAGS , TPM_ORD_OSAP) |
410 | tpm_buf_append_u16(tb, type) |
411 | tpm_buf_append_u32(tb, handle) |
412 | tpm_buf_append(tb, ononce, TPM_NONCE_SIZE) |
414 | ret等于For key specific tpm requests, we will generate and send our* own TPM command packets using the drivers send function. |
418 | handle等于LOAD32(data, TPM_DATA_OFFSET) |
419 | memcpy(enonce, & (data[TPM_DATA_OFFSET + sizeof(uint32_t)]), TPM_NONCE_SIZE) |
421 | memcpy(enonce, & (data[TPM_DATA_OFFSET + sizeof(uint32_t) + TPM_NONCE_SIZE]), TPM_NONCE_SIZE) |
423 | 返回:TSS_rawhmac(secret, key, SHA1_DIGEST_SIZE, TPM_NONCE_SIZE, enonce, TPM_NONCE_SIZE, ononce, 0, 0) |
名称 | 描述 |
---|---|
tpm_seal | Have the TPM seal(encrypt) the trusted key, possibly based on* Platform Configuration Registers (PCRs). AUTH1 for sealing key. |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |