selftests/sgx: Use a statically generated 3072-bit RSA key
authorJarkko Sakkinen <jarkko@kernel.org>
Wed, 18 Nov 2020 17:06:40 +0000 (19:06 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 18 Nov 2020 17:26:00 +0000 (18:26 +0100)
commit0eaa8d153a1d573e53b8283c90db44057d1376f6
tree75042751bad80d352eb838f9656c1c07eafc87b9
parent67655b57f8f59467506463055d9a8398d2836377
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
tools/testing/selftests/sgx/Makefile
tools/testing/selftests/sgx/main.h
tools/testing/selftests/sgx/sign_key.S [new file with mode: 0644]
tools/testing/selftests/sgx/sign_key.pem [new file with mode: 0644]
tools/testing/selftests/sgx/sigstruct.c