函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\digsig.c Create Date:2022-07-27 08:18:43
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:digsig_verify() - digital signature verification with public key*@keyring: keyring to search key in*@sig: digital signature*@siglen: length of the signature*@data: data*@datalen: length of the data* Returns 0 on success, -EINVAL otherwise

函数原型:int digsig_verify(struct key *keyring, const char *sig, int siglen, const char *data, int datalen)

返回类型:int

参数:

类型参数名称
struct key *keyring
const char *sig
intsiglen
const char *data
intdatalen
202  err等于负ENOMEM
203  sh等于sig
204  struct shash_desc * desc = NULL
209  如果siglen小于sh的长度加2则返回:负EINVAL
212  如果algo不等于PUBKEY_ALGO_RSA则返回:负Operation is not supported
215  输出格式化串
217  如果keyring
220  kref等于keyring_search - Search the supplied keyring tree for a matching key*@keyring: The root of the keyring tree to be searched
222  如果是错误key等于错误指示
224  否则key等于key_ref_to_ptr(kref)
226  否则
227  key等于quest_key - Request a key and wait for construction*@type: Type of key.*@description: The searchable description of the key.*@callout_info: The data to pass to the instantiation upcall (or NULL).
229  如果是错误
230  打印错误信息("key not found, id: %s\n", name)
231  返回:错误
234  desc等于分配内存并置零
236  如果非desc则转到:err
239  tfm等于shash
241  rypto_shash_init() - (re)initialize message digest*@desc: operational state handle that is already filled* The call (re-)initializes the message digest referenced by the* operational state handle. Any potentially existing state created by
242  rypto_shash_update() - add data to message digest for processing*@desc: operational state handle that is already initialized*@data: input data to be added to the message digest*@len: length of the input data
243  rypto_shash_update() - add data to message digest for processing*@desc: operational state handle that is already initialized*@data: input data to be added to the message digest*@len: length of the input data
244  rypto_shash_final() - calculate message digest*@desc: operational state handle that is already filled with data*@out: output buffer filled with the message digest* Finalize the message digest operation and create the message digest
246  kfree(desc)
249  err等于RSA公钥签名验证
252  err :
253  key_put - Discard a reference to a key.*@key: The key to discard a reference from.* Discard a reference to a key, and when all the references are gone, we* schedule the cleanup task to come and pull it out of the tree in process
255  返回:如果err则负EINVAL否则0
调用者
名称描述
integrity_digsig_verify