Function report |
Source Code:security\keys\trusted-keys\trusted_tpm1.c |
Create Date:2022-07-28 18:30:26 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Create an object specific authorisation protocol (OSAP) session
Proto:static int osap(struct tpm_buf *tb, struct osapsess *s, const unsigned char *key, uint16_t type, uint32_t handle)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
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 | If ret != TPM_NONCE_SIZE Then Return 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 | Return TSS_rawhmac(secret, key, SHA1_DIGEST_SIZE, TPM_NONCE_SIZE, enonce, TPM_NONCE_SIZE, ononce, 0, 0) |
Name | Describe |
---|---|
tpm_seal | Have the TPM seal(encrypt) the trusted key, possibly based on* Platform Configuration Registers (PCRs). AUTH1 for sealing key. |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |