Function report |
Source Code:security\keys\encrypted-keys\encrypted.c |
Create Date:2022-07-28 18:32:55 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:datablob_parse - parse the keyctl data* datablob format:* new [<format>] <master-key name> <decrypted data length>* load [<format>] <master-key name> <decrypted data length>* <encrypted iv + data>* update <new-master-key name>* Tokenizes a copy of the
Proto:static int datablob_parse(char *datablob, const char **format, char **master_desc, char **decrypted_datalen, char **hex_encoded_iv)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
char * | datablob | |
const char ** | format | |
char ** | master_desc | |
char ** | decrypted_datalen | |
char ** | hex_encoded_iv |
182 | If Not keyword Then |
186 | key_cmd = match_token(keyword, key_tokens, args) |
190 | If Not p Then |
195 | key_format = match_token(p, key_format_tokens, args) |
197 | Case key_format == Opt_ecryptfs |
198 | Case key_format == Opt_enc32 |
199 | Case key_format == Opt_default |
202 | Break |
203 | Case key_format == Opt_error |
204 | master_desc = p |
205 | Break |
208 | If Not master_desc Then |
214 | pr_info("encrypted_key: master key parameter \'%s\' is invalid\n", * master_desc) |
216 | Go to out |
219 | If decrypted_datalen Then |
221 | If Not decrypted_datalen Then |
222 | pr_info("encrypted_key: keylen parameter is missing\n") |
223 | Go to out |
237 | If Not decrypted_datalen Then |
240 | Break |
243 | If Not hex_encoded_iv Then |
244 | pr_info("encrypted_key: hex blob is missing\n") |
245 | Break |
247 | ret = 0 |
248 | Break |
249 | Case key_cmd == Opt_update |
250 | If decrypted_datalen Then |
251 | pr_info("encrypted_key: keyword \'%s\' not allowed when called from .instantiate method\n", keyword) |
254 | Break |
256 | ret = 0 |
257 | Break |
263 | out : |
264 | Return ret |
Name | Describe |
---|---|
encrypted_instantiate | rypted_instantiate - instantiate an encrypted key* Decrypt an existing encrypted datablob or create a new encrypted key* based on a kernel random number.* On success, return 0. Otherwise return errno. |
encrypted_update | rypted_update - update the master key description* Change the master key description for an existing encrypted key.* The next read will return an encrypted datablob using the new* master key description.* On success, return 0. Otherwise return errno. |
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 |