| Function report | 
| Source Code: security\keys\trusted-keys\trusted_tpm1.c | Create Date:2022-07-28 18:30:08 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:verify the AUTH1_COMMAND (Seal) result from TPM
Proto:int TSS_checkhmac1(unsigned char *buffer, const uint32_t command, const unsigned char *ononce, const unsigned char *key, unsigned int keylen, ...)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| unsigned char * | buffer | |
| const uint32_t | command | |
| const unsigned char * | ononce | |
| const unsigned char * | key | |
| unsigned int | keylen | 
| 201 | bufsize = LOAD32(buffer, TPM_SIZE_OFFSET) | 
| 204 | result = LOAD32N(buffer, TPM_RETURN_OFFSET) | 
| 205 | If tag == TPM_TAG_RSP_COMMAND Then Return 0 | 
| 207 | If tag != TPM_TAG_RSP_AUTH1_COMMAND Then Return -EINVAL | 
| 209 | authdata = buffer + bufsize - SHA1_DIGEST_SIZE | 
| 210 | continueflag = authdata - 1 | 
| 211 | enonce = continueflag - TPM_NONCE_SIZE | 
| 213 | sdesc = init_sdesc(hashalg) | 
| 230 | cycle | 
| 232 | If dlen == 0 Then Break | 
| 236 | If ret < 0 Then Break | 
| 245 | ret = TSS_rawhmac(testhmac, key, keylen, SHA1_DIGEST_SIZE, paramdigest, TPM_NONCE_SIZE, enonce, TPM_NONCE_SIZE, ononce, 1, continueflag, 0, 0) | 
| 253 | out : | 
| 255 | Return ret | 
| 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 |