* [PATCH] KEYS: Fix the wrong index when checking the existence of second id
@ 2017-10-04 11:18 Lee, Chun-Yi
0 siblings, 0 replies; only message in thread
From: Lee, Chun-Yi @ 2017-10-04 11:18 UTC (permalink / raw)
To: David Howells
Cc: keyrings, linux-crypto, linux-kernel, Lee, Chun-Yi, Herbert Xu,
David S. Miller
Fix the wrong index number when checking the existence of second
id in function of finding asymmetric key. The id_1 is the second
id that the index in array must be 1 but not 0.
Fix: 9eb029893(KEYS: Generalise x509_request_asymmetric_key())
Cc: David Howells <dhowells@redhat.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: "Lee, Chun-Yi" <jlee@suse.com>
---
crypto/asymmetric_keys/asymmetric_type.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crypto/asymmetric_keys/asymmetric_type.c b/crypto/asymmetric_keys/asymmetric_type.c
index 3a3b028..39aecad 100644
--- a/crypto/asymmetric_keys/asymmetric_type.c
+++ b/crypto/asymmetric_keys/asymmetric_type.c
@@ -107,7 +107,7 @@ struct key *find_asymmetric_key(struct key *keyring,
if (id_0 && id_1) {
const struct asymmetric_key_ids *kids = asymmetric_key_ids(key);
- if (!kids->id[0]) {
+ if (!kids->id[1]) {
pr_debug("First ID matches, but second is missing\n");
goto reject;
}
--
2.10.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-04 11:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-04 11:18 [PATCH] KEYS: Fix the wrong index when checking the existence of second id Lee, Chun-Yi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®