函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:asymmetric_verify

函数原型:int asymmetric_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
82  hdr等于sig
84  ret等于负ENOMEM
86  如果siglen小于等于hdr的长度则返回:负EBADMSG
89  siglen减等于hdr的长度
91  如果siglen不等于be16_to_cpu(signature size )则返回:负EBADMSG
94  如果Digest algorithm [enum hash_algo] 大于等于HASH_ALGO__LAST则返回:负ENOPKG
97  key等于Request an asymmetric key.
98  如果是错误则返回:错误
101  memset( & pks, 0, pks的长度)
103  hash_algo等于hash_algo_name[Digest algorithm [enum hash_algo] ]
104  如果Digest algorithm [enum hash_algo] 恒等于HASH_ALGO_STREEBOG_256Digest algorithm [enum hash_algo] 恒等于HASH_ALGO_STREEBOG_512
107  pkey_algo等于"ecrdsa"
108  encoding等于"raw"
109  否则
110  pkey_algo等于"rsa"
111  encoding等于"pkcs1"
113  digest等于data
114  Number of bytes in digest 等于datalen
115  Signature 等于signature payload
116  Number of bytes in signature 等于siglen
117  ret等于verify_signature(key, & pks)
118  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
119  pr_debug("%s() = %d\n", __func__, ret)
120  返回:ret
调用者
名称描述
integrity_digsig_verify