Function report | 
Source Code:security\integrity\ima\ima_appraise.c | 
Create Date:2022-07-28 19:59:23 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:ima_get_hash_algo
Proto:enum hash_algo ima_get_hash_algo(struct evm_ima_xattr_data *xattr_value, int xattr_len)
Type:enum hash_algo
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct evm_ima_xattr_data * | xattr_value | |
| int | xattr_len | 
| 157 | If Not xattr_value || xattr_len < 2 Then Return ima_hash_algo | 
| 162 | Case type == EVM_IMA_XATTR_DIGSIG | 
| 163 | sig = xattr_value | 
| 164 | If signature format version != 2 || xattr_len <= size of sig Then Return ima_hash_algo | 
| 166 | Return Digest algorithm [enum hash_algo] | 
| 167 | Break | 
| 168 | Case type == IMA_XATTR_DIGEST_NG | 
| 174 | Case type == IMA_XATTR_DIGEST | 
| 176 | If xattr_len == 21 Then | 
| 177 | zero = 0 | 
| 178 | If Not memcmp( & data[16], & zero, 4) Then Return HASH_ALGO_MD5 | 
| 180 | Else Return HASH_ALGO_SHA1 | 
| 182 | Else if xattr_len == 17 Then Return HASH_ALGO_MD5 | 
| 184 | Break | 
| 188 | Return ima_hash_algo | 
| 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  |