diff options
author | David Howells <dhowells@redhat.com> | 2013-09-04 14:28:03 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2013-09-25 12:17:01 -0400 |
commit | cd0421dcd0230d3e402ae9c6d012610132c3f078 (patch) | |
tree | 11005c9476e56b50045deceae39633d50be3a595 /crypto | |
parent | 008643b86c5f33c115c84ccdda1725cac3ad50ad (diff) |
KEYS: Set the asymmetric-key type default search method
The keyring expansion patches introduces a new search method by which
key_search() attempts to walk directly to the key that has exactly the same
description as the requested one.
However, this causes inexact matching of asymmetric keys to fail. The
solution to this is to select iterative rather than direct search as the
default search type for asymmetric keys.
As an example, the kernel might have a key like this:
Magrathea: Glacier signing key: 6a2a0f82bad7e396665f465e4e3e1f9bd24b1226
and:
keyctl search <keyring-ID> asymmetric id:d24b1226
should find the key, despite that not being its exact description.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/asymmetric_keys/asymmetric_type.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/asymmetric_keys/asymmetric_type.c b/crypto/asymmetric_keys/asymmetric_type.c index cf807654d221..b77eb5304788 100644 --- a/crypto/asymmetric_keys/asymmetric_type.c +++ b/crypto/asymmetric_keys/asymmetric_type.c | |||
@@ -209,6 +209,7 @@ struct key_type key_type_asymmetric = { | |||
209 | .match = asymmetric_key_match, | 209 | .match = asymmetric_key_match, |
210 | .destroy = asymmetric_key_destroy, | 210 | .destroy = asymmetric_key_destroy, |
211 | .describe = asymmetric_key_describe, | 211 | .describe = asymmetric_key_describe, |
212 | .def_lookup_type = KEYRING_SEARCH_LOOKUP_ITERATE, | ||
212 | }; | 213 | }; |
213 | EXPORT_SYMBOL_GPL(key_type_asymmetric); | 214 | EXPORT_SYMBOL_GPL(key_type_asymmetric); |
214 | 215 | ||