Function report |
Source Code:security\keys\trusted-keys\trusted_tpm1.c |
Create Date:2022-07-28 18:31:34 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:rusted_update - reseal an existing key with new PCR values
Proto:static int trusted_update(struct key *key, struct key_preparsed_payload *prep)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct key * | key | |
struct key_preparsed_payload * | prep |
1059 | datalen = Raw datalen |
1061 | ret = 0 |
1063 | If key_is_negative(key) Then Return -ENOKEY |
1066 | If Not migratable Then Return -EPERM |
1071 | datablob = Allocation memory |
1074 | new_o = trusted_options_alloc() |
1075 | If Not new_o Then |
1079 | new_p = trusted_payload_alloc(key) |
1080 | If Not new_p Then |
1087 | ret = datablob_parse - parse the keyctl data and fill in the* payload and options structures* On success returns 0, otherwise -EINVAL. |
1088 | If ret != Opt_update Then |
1091 | Go to out |
1094 | If Not keyhandle Then |
1097 | Go to out |
1101 | migratable = migratable |
1104 | dump_payload(p) |
1105 | dump_payload(new_p) |
1108 | If ret < 0 Then |
1111 | Go to out |
1113 | If pcrlock Then |
1114 | ret = Lock a trusted key, by extending a selected PCR.* Prevents a trusted key that is sealed to PCRs from being accessed.* This uses the tpm driver's extend function. |
1115 | If ret < 0 Then |
1118 | Go to out |
1121 | rcu_assign_keypointer(key, new_p) |
1123 | out : |
1126 | Return ret |
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 |