提交 876c6e3e 编写于 作者: D David Howells 提交者: James Morris

KEYS: Fix public_key asymmetric key subtype name

The length of the name of an asymmetric key subtype must be stored in struct
asymmetric_key_subtype::name_len so that it can be matched by a search for
"<subkey_name>:<partial_fingerprint>".  Fix the public_key subtype to have
name_len set.
Signed-off-by: NDavid Howells <dhowells@redhat.com>
Signed-off-by: NJames Morris <james.l.morris@oracle.com>
上级 738c5d19
...@@ -121,6 +121,7 @@ static int public_key_verify_signature_2(const struct key *key, ...@@ -121,6 +121,7 @@ static int public_key_verify_signature_2(const struct key *key,
struct asymmetric_key_subtype public_key_subtype = { struct asymmetric_key_subtype public_key_subtype = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = "public_key", .name = "public_key",
.name_len = sizeof("public_key") - 1,
.describe = public_key_describe, .describe = public_key_describe,
.destroy = public_key_destroy, .destroy = public_key_destroy,
.verify_signature = public_key_verify_signature_2, .verify_signature = public_key_verify_signature_2,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册