lkml.org 
[lkml]   [2014]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/4] KEYS: fix couple of things
Date
Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
---
crypto/asymmetric_keys/x509_public_key.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/crypto/asymmetric_keys/x509_public_key.c b/crypto/asymmetric_keys/x509_public_key.c
index 6af338f..962f9b9 100644
--- a/crypto/asymmetric_keys/x509_public_key.c
+++ b/crypto/asymmetric_keys/x509_public_key.c
@@ -177,6 +177,7 @@ static int x509_validate_trust(struct x509_certificate *cert,
if (!IS_ERR(key)) {
pk = key->payload.data;
ret = x509_check_signature(pk, cert);
+ key_put(key);
}
return ret;
}
@@ -237,7 +238,7 @@ static int x509_key_preparse(struct key_preparsed_payload *prep)
ret = x509_check_signature(cert->pub, cert); /* self-signed */
if (ret < 0)
goto error_free_cert;
- } else {
+ } else if (!prep->trusted) {
ret = x509_validate_trust(cert,
get_system_or_owner_trusted_keyring());
if (!ret)
--
1.9.1


\
 
 \ /
  Last update: 2014-06-10 11:21    [W:0.117 / U:4.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site