Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\keys\encrypted-keys\encrypted.c Create Date:2022-07-28 18:33:12
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:request_master_key

Proto:static struct key *request_master_key(struct encrypted_key_payload *epayload, const u8 **master_key, size_t *master_keylen)

Type:struct key

Parameter:

TypeParameterName
struct encrypted_key_payload *epayload
const u8 **master_key
size_t *master_keylen
425  mkey = ERR_PTR( - EINVAL)
427  If Not strncmp( datablob: master key name , KEY_TRUSTED_PREFIX, KEY_TRUSTED_PREFIX_LEN) Then
429  mkey = request_trusted_key( datablob: master key name + KEY_TRUSTED_PREFIX_LEN, master_key, master_keylen)
432  Else if Not strncmp( datablob: master key name , KEY_USER_PREFIX, KEY_USER_PREFIX_LEN) Then
434  mkey = quest_user_key - request the user key* Use a user provided key to encrypt/decrypt an encrypted-key.
437  Else Go to out
440  If IS_ERR(mkey) Then
441  ret = PTR_ERR(mkey)
443  If ret == -Operation is not supported Then pr_info("encrypted_key: key %s not supported", datablob: master key name )
446  Else pr_info("encrypted_key: key %s not found", datablob: master key name )
449  Go to out
452  dump_master_key( * master_key, * master_keylen)
453  out :
454  Return mkey
Caller
NameDescribe
encrypted_key_decrypt
encrypted_readrypted_read - format and copy the encrypted data to userspace* The resulting datablob format is:* * On success, return to userspace the encrypted key datablob size.