nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ndctl: fix load-keys for user master-key
@ 2019-03-28 19:07 Dave Jiang
  2019-03-28 19:07 ` [PATCH 2/3] ndctl: fix key blob loading for user keys Dave Jiang
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Dave Jiang @ 2019-03-28 19:07 UTC (permalink / raw)
  To: vishal.l.verma; +Cc: linux-nvdimm

load-keys incorrectly assumes that all keys have TPM handles. TPM handle is
only for trusted-keys. Fix in order to allow user master-key work.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
 ndctl/load-keys.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/ndctl/load-keys.c b/ndctl/load-keys.c
index 8e4998f2..19380152 100644
--- a/ndctl/load-keys.c
+++ b/ndctl/load-keys.c
@@ -213,10 +213,8 @@ static int load_keys(struct loadkeys *lk_ctx, const char *keypath,
 
 	if (!tpmhandle) {
 		rc = check_tpm_handle(lk_ctx);
-		if (rc < 0) {
-			rc = -errno;
-			goto erropen;
-		}
+		if (rc < 0)
+			printf("No TPM handle discovered.\n");
 	}
 
 	rc = load_master_key(lk_ctx, param.key_path);

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-03-28 21:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-28 19:07 [PATCH 1/3] ndctl: fix load-keys for user master-key Dave Jiang
2019-03-28 19:07 ` [PATCH 2/3] ndctl: fix key blob loading for user keys Dave Jiang
2019-03-28 19:18   ` Dan Williams
2019-03-28 19:30     ` Dave Jiang
2019-03-28 19:07 ` [PATCH 3/3] ndctl: add unit test for load-keys Dave Jiang
2019-03-28 21:29   ` Verma, Vishal L
2019-03-28 19:11 ` [PATCH 1/3] ndctl: fix load-keys for user master-key Dan Williams
2019-03-28 19:17   ` Dave Jiang
2019-03-28 19:19     ` Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).