]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
KEYS: trusted: Create trusted keys subsystem
authorSumit Garg <sumit.garg@linaro.org>
Wed, 16 Oct 2019 05:14:54 +0000 (10:44 +0530)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tue, 12 Nov 2019 19:45:37 +0000 (21:45 +0200)
Move existing code to trusted keys subsystem. Also, rename files with
"tpm" as suffix which provides the underlying implementation.

Suggested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
crypto/asymmetric_keys/asym_tpm.c
include/Kbuild
include/keys/trusted_tpm.h [moved from include/keys/trusted.h with 96% similarity]
security/keys/Makefile
security/keys/trusted-keys/Makefile [new file with mode: 0644]
security/keys/trusted-keys/trusted_tpm1.c [moved from security/keys/trusted.c with 99% similarity]

index a2b2a610c2dfa1be44f346590fb34a37a0ed9b5e..d16d893bd1959ca7d69eab2b011faa13c8e410c9 100644 (file)
@@ -13,7 +13,7 @@
 #include <crypto/sha.h>
 #include <asm/unaligned.h>
 #include <keys/asymmetric-subtype.h>
-#include <keys/trusted.h>
+#include <keys/trusted_tpm.h>
 #include <crypto/asym_tpm_subtype.h>
 #include <crypto/public_key.h>
 
index ffba79483cc5edad5f3327a624bd0c1bba2aa822..6f9ec5a64ec5173fbdf01f5684bdf7e98c4d9bb1 100644 (file)
@@ -65,7 +65,6 @@ header-test-                  += keys/asymmetric-subtype.h
 header-test-                   += keys/asymmetric-type.h
 header-test-                   += keys/big_key-type.h
 header-test-                   += keys/request_key_auth-type.h
-header-test-                   += keys/trusted.h
 header-test-                   += kvm/arm_arch_timer.h
 header-test-                   += kvm/arm_pmu.h
 header-test-$(CONFIG_ARM)      += kvm/arm_psci.h
similarity index 96%
rename from include/keys/trusted.h
rename to include/keys/trusted_tpm.h
index 29e3e9ba8e1a8ef6c9bb952e7fb059f3e3b4bf72..7b9d7b450a9edb3d6f8bcd121d7ad678506c0e1c 100644 (file)
@@ -1,6 +1,9 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-#ifndef __TRUSTED_KEY_H
-#define __TRUSTED_KEY_H
+#ifndef __TRUSTED_TPM_H
+#define __TRUSTED_TPM_H
+
+#include <keys/trusted-type.h>
+#include <linux/tpm_command.h>
 
 /* implementation specific TPM constants */
 #define MAX_BUF_SIZE                   1024
index 9cef54064f6084a3694a33eae143f960aebba979..074f27538f55968e1a3ee3d2187d89bfb99d8f44 100644 (file)
@@ -28,5 +28,5 @@ obj-$(CONFIG_ASYMMETRIC_KEY_TYPE) += keyctl_pkey.o
 # Key types
 #
 obj-$(CONFIG_BIG_KEYS) += big_key.o
-obj-$(CONFIG_TRUSTED_KEYS) += trusted.o
+obj-$(CONFIG_TRUSTED_KEYS) += trusted-keys/
 obj-$(CONFIG_ENCRYPTED_KEYS) += encrypted-keys/
diff --git a/security/keys/trusted-keys/Makefile b/security/keys/trusted-keys/Makefile
new file mode 100644 (file)
index 0000000..1a24680
--- /dev/null
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for trusted keys
+#
+
+obj-$(CONFIG_TRUSTED_KEYS) += trusted.o
+trusted-y += trusted_tpm1.o
similarity index 99%
rename from security/keys/trusted.c
rename to security/keys/trusted-keys/trusted_tpm1.c
index 707101170aec47067bb5d2625d135618d5e2de87..e3155fd08f5b258fca135e1a1d1c2705367a4aec 100644 (file)
@@ -27,7 +27,7 @@
 #include <linux/tpm.h>
 #include <linux/tpm_command.h>
 
-#include <keys/trusted.h>
+#include <keys/trusted_tpm.h>
 
 static const char hmac_alg[] = "hmac(sha1)";
 static const char hash_alg[] = "sha1";