summaryrefslogtreecommitdiffstats
path: root/crypto/asymmetric_keys
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2014-09-02 13:52:10 +0100
committerJames Morris <james.l.morris@oracle.com>2014-09-03 10:27:28 +1000
commit876c6e3e028d1b326c81f6f134a4804b92f67dc7 (patch)
treea70cb4313b97312923bab99c1799446a79551de4 /crypto/asymmetric_keys
parent738c5d190f6540539a04baf36ce21d46b5da04bd (diff)
downloadop-kernel-dev-876c6e3e028d1b326c81f6f134a4804b92f67dc7.zip
op-kernel-dev-876c6e3e028d1b326c81f6f134a4804b92f67dc7.tar.gz
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: David Howells <dhowells@redhat.com> Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'crypto/asymmetric_keys')
-rw-r--r--crypto/asymmetric_keys/public_key.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/asymmetric_keys/public_key.c b/crypto/asymmetric_keys/public_key.c
index 97eb0019..2f6e4fb 100644
--- a/crypto/asymmetric_keys/public_key.c
+++ b/crypto/asymmetric_keys/public_key.c
@@ -121,6 +121,7 @@ static int public_key_verify_signature_2(const struct key *key,
struct asymmetric_key_subtype public_key_subtype = {
.owner = THIS_MODULE,
.name = "public_key",
+ .name_len = sizeof("public_key") - 1,
.describe = public_key_describe,
.destroy = public_key_destroy,
.verify_signature = public_key_verify_signature_2,
OpenPOWER on IntegriCloud