| Function report | 
| Source Code: fs\verity\signature.c | Create Date:2022-07-28 20:25:04 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:sverity_verify_signature() - check a verity file's signature* If the file's fs-verity descriptor includes a signature of the file* measurement, verify it against the certificates in the fs-verity keyring
Proto:int fsverity_verify_signature(const struct fsverity_info *vi, const struct fsverity_descriptor *desc, size_t desc_size)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| const struct fsverity_info * | vi | |
| const struct fsverity_descriptor * | desc | |
| size_t | desc_size | 
| 47 | If sig_size == 0 Then | 
| 49 | fsverity_err(inode, "require_signatures=1, rejecting unsigned file!") | 
| 51 | Return -EPERM | 
| 53 | Return 0 | 
| 57 | fsverity_err(inode, "Signature overflows verity descriptor") | 
| 58 | Return -EBADMSG | 
| 61 | d = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). | 
| 64 | memcpy(must be "FSVerity" , "FSVerity", 8) | 
| 76 | If err Then | 
| 77 | If err == -ENOKEY Then fsverity_err(inode, "File's signing cert isn't in the fs-verity keyring") | 
| 80 | Else if err == -EKEYREJECTED Then fsverity_err(inode, "Incorrect file signature") | 
| 82 | Else if err == -EBADMSG Then fsverity_err(inode, "Malformed file signature") | 
| 84 | Else fsverity_err(inode, "Error %d verifying file signature", err) | 
| 87 | Return err | 
| 90 | pr_debug("Valid signature for file measurement %s:%*phN\n", crypto API name, e.g. sha256 , digest size in bytes, e.g. 32 for SHA-256 , measurement) | 
| 92 | Return 0 | 
| 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 |