Function report |
Source Code:security\keys\trusted-keys\trusted_tpm2.c |
Create Date:2022-07-28 18:32:08 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:pm2_load_cmd() - execute a TPM2_Load command*@chip: TPM chip to use*@payload: the key data in clear and encrypted form*@options: authentication values and other options*@blob_handle: returned blob handle* Return: 0 on success.
Proto:static int tpm2_load_cmd(struct tpm_chip *chip, struct trusted_key_payload *payload, struct trusted_key_options *options, unsigned int *blob_handle)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct tpm_chip * | chip | |
| struct trusted_key_payload * | payload | |
| struct trusted_key_options * | options | |
| unsigned int * | blob_handle |
| 187 | private_len = be16_to_cpup((__be16 * ) & blob[0]) |
| 188 | If private_len > blob_len - 2 Then Return -E2BIG |
| 191 | public_len = be16_to_cpup((__be16 * ) & blob[2 + private_len]) |
| 192 | blob_len = private_len + public_len + 4 |
| 196 | rc = tpm_buf_init( & buf, TPM2_ST_SESSIONS, TPM2_CC_LOAD) |
| 200 | tpm_buf_append_u32( & buf, keyhandle) |
| 207 | tpm_buf_append( & buf, blob, blob_len) |
| 209 | If flags & TPM_BUF_OVERFLOW Then |
| 215 | If Not rc Then blob_handle = be32_to_cpup((__be32 * ) & data[TPM_HEADER_SIZE]) |
| 219 | out : |
| 220 | tpm_buf_destroy( & buf) |
| 225 | Return rc |
| Name | Describe |
|---|---|
| tpm2_unseal_trusted | pm2_unseal_trusted() - unseal the payload of a trusted key*@chip: TPM chip to use*@payload: the key data in clear and encrypted form*@options: authentication values and other options* Return: Same as with tpm_send. |
| 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 |