Skip to content

Commit 47f9c27

Browse files
b49020Jarkko Sakkinen
authored andcommitted
KEYS: trusted: Create trusted keys subsystem
Move existing code to trusted keys subsystem. Also, rename files with "tpm" as suffix which provides the underlying implementation. Suggested-by: Jarkko Sakkinen <[email protected]> Signed-off-by: Sumit Garg <[email protected]> Reviewed-by: Jarkko Sakkinen <[email protected]> Tested-by: Jarkko Sakkinen <[email protected]> Signed-off-by: Jarkko Sakkinen <[email protected]>
1 parent c6f61e5 commit 47f9c27

File tree

6 files changed

+15
-6
lines changed

6 files changed

+15
-6
lines changed

crypto/asymmetric_keys/asym_tpm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <crypto/sha.h>
1414
#include <asm/unaligned.h>
1515
#include <keys/asymmetric-subtype.h>
16-
#include <keys/trusted.h>
16+
#include <keys/trusted_tpm.h>
1717
#include <crypto/asym_tpm_subtype.h>
1818
#include <crypto/public_key.h>
1919

include/Kbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ header-test- += keys/asymmetric-subtype.h
6565
header-test- += keys/asymmetric-type.h
6666
header-test- += keys/big_key-type.h
6767
header-test- += keys/request_key_auth-type.h
68-
header-test- += keys/trusted.h
6968
header-test- += kvm/arm_arch_timer.h
7069
header-test- += kvm/arm_pmu.h
7170
header-test-$(CONFIG_ARM) += kvm/arm_psci.h

include/keys/trusted.h renamed to include/keys/trusted_tpm.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
/* SPDX-License-Identifier: GPL-2.0 */
2-
#ifndef __TRUSTED_KEY_H
3-
#define __TRUSTED_KEY_H
2+
#ifndef __TRUSTED_TPM_H
3+
#define __TRUSTED_TPM_H
4+
5+
#include <keys/trusted-type.h>
6+
#include <linux/tpm_command.h>
47

58
/* implementation specific TPM constants */
69
#define MAX_BUF_SIZE 1024

security/keys/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ obj-$(CONFIG_ASYMMETRIC_KEY_TYPE) += keyctl_pkey.o
2828
# Key types
2929
#
3030
obj-$(CONFIG_BIG_KEYS) += big_key.o
31-
obj-$(CONFIG_TRUSTED_KEYS) += trusted.o
31+
obj-$(CONFIG_TRUSTED_KEYS) += trusted-keys/
3232
obj-$(CONFIG_ENCRYPTED_KEYS) += encrypted-keys/
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
#
3+
# Makefile for trusted keys
4+
#
5+
6+
obj-$(CONFIG_TRUSTED_KEYS) += trusted.o
7+
trusted-y += trusted_tpm1.o

security/keys/trusted.c renamed to security/keys/trusted-keys/trusted_tpm1.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <linux/tpm.h>
2828
#include <linux/tpm_command.h>
2929

30-
#include <keys/trusted.h>
30+
#include <keys/trusted_tpm.h>
3131

3232
static const char hmac_alg[] = "hmac(sha1)";
3333
static const char hash_alg[] = "sha1";

0 commit comments

Comments
 (0)