函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\integrity\platform_certs\load_uefi.c Create Date:2022-07-27 21:55:09
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Load the certs contained in the UEFI databases into the platform trusted* keyring and the UEFI blacklisted X.509 cert SHA256 hashes into the blacklist* keyring.

函数原型:static int __init load_uefi_certs(void)

返回类型:int

参数:

75  secure_var等于EFI_IMAGE_SECURITY_DATABASE_GUID
76  mok_var等于EFI_SHIM_LOCK_GUID
77  void * db = NULL, * dbx = NULL, * mok = NULL
78  dbsize等于0, dbxsize等于0, moksize等于0
80  rc等于0
82  如果非get_variable则返回:false
88  如果非Look to see if a UEFI variable called MokIgnoreDB exists and return true if* it does
89  db等于Get a certificate list blob from the named EFI variable.
90  如果非db
91  如果status恒等于EFI_NOT_FOUNDpr_debug("MODSIGN: db variable wasn't found\n")
93  否则打印错误信息("MODSIGN: Couldn't get UEFI db list\n")
95  否则
98  如果rc打印错误信息("Couldn't parse db signatures: %d\n", rc)
101  释放内存
105  mok等于Get a certificate list blob from the named EFI variable.
106  如果非mok
107  如果status恒等于EFI_NOT_FOUNDpr_debug("MokListRT variable wasn't found\n")
109  否则打印信息("Couldn't get UEFI MokListRT\n")
111  否则
112  rc等于parse_efi_signature_list - Parse an EFI signature list for certificates*@source: The source of the key*@data: The data blob to parse*@size: The size of the data blob*@get_handler_for_guid: Get the handler func for the sig type (or NULL)
114  如果rc打印错误信息("Couldn't parse MokListRT signatures: %d\n", rc)
116  释放内存
119  dbx等于Get a certificate list blob from the named EFI variable.
120  如果非dbx
121  如果status恒等于EFI_NOT_FOUNDpr_debug("dbx variable wasn't found\n")
123  否则打印信息("Couldn't get UEFI dbx list\n")
125  否则
126  rc等于parse_efi_signature_list - Parse an EFI signature list for certificates*@source: The source of the key*@data: The data blob to parse*@size: The size of the data blob*@get_handler_for_guid: Get the handler func for the sig type (or NULL)
129  如果rc打印错误信息("Couldn't parse dbx signatures: %d\n", rc)
131  释放内存
134  返回:rc