summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/sgx/Makefile
diff options
context:
space:
mode:
authorJarkko Sakkinen <jarkko@kernel.org>2020-11-18 19:06:40 +0200
committerBorislav Petkov <bp@suse.de>2020-11-18 18:26:00 +0100
commit0eaa8d153a1d573e53b8283c90db44057d1376f6 (patch)
tree75042751bad80d352eb838f9656c1c07eafc87b9 /tools/testing/selftests/sgx/Makefile
parent67655b57f8f59467506463055d9a8398d2836377 (diff)
downloadlwn-0eaa8d153a1d573e53b8283c90db44057d1376f6.tar.gz
lwn-0eaa8d153a1d573e53b8283c90db44057d1376f6.zip
selftests/sgx: Use a statically generated 3072-bit RSA key
Use a statically generated key for signing the enclave, because generating keys on the fly can eat the kernel entropy pool. Another good reason for doing this is predictable builds. The RSA has been arbitrarily selected. It's contents do not matter. This also makes the selftest execute a lot quicker instead of the delay that it had before (because of slow key generation). [ bp: Disambiguate "static key" which means something else in the kernel, fix typos. ] Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: linux-kselftest@vger.kernel.org Link: https://lkml.kernel.org/r/20201118170640.39629-1-jarkko@kernel.org
Diffstat (limited to 'tools/testing/selftests/sgx/Makefile')
-rw-r--r--tools/testing/selftests/sgx/Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/testing/selftests/sgx/Makefile b/tools/testing/selftests/sgx/Makefile
index d51c90663943..7f12d55b97f8 100644
--- a/tools/testing/selftests/sgx/Makefile
+++ b/tools/testing/selftests/sgx/Makefile
@@ -25,7 +25,8 @@ endif
$(OUTPUT)/test_sgx: $(OUTPUT)/main.o \
$(OUTPUT)/load.o \
$(OUTPUT)/sigstruct.o \
- $(OUTPUT)/call.o
+ $(OUTPUT)/call.o \
+ $(OUTPUT)/sign_key.o
$(CC) $(HOST_CFLAGS) -o $@ $^ -lcrypto
$(OUTPUT)/main.o: main.c
@@ -40,6 +41,9 @@ $(OUTPUT)/sigstruct.o: sigstruct.c
$(OUTPUT)/call.o: call.S
$(CC) $(HOST_CFLAGS) -c $< -o $@
+$(OUTPUT)/sign_key.o: sign_key.S
+ $(CC) $(HOST_CFLAGS) -c $< -o $@
+
$(OUTPUT)/test_encl.elf: test_encl.lds test_encl.c test_encl_bootstrap.S
$(CC) $(ENCL_CFLAGS) -T $^ -o $@