From 22b35e0cb2c136f7eead71e7341bd7d50fa68e3b Mon Sep 17 00:00:00 2001 From: Emil Hemdal Date: Wed, 6 May 2020 10:38:11 +0200 Subject: [PATCH] [Examples] Use SGX_SIGNER_KEY in Makefiles The documentation currently specifies SGX_SIGNER_KEY as the parameter to enable Graphene to find your keys. Some examples don't use this environment parameter, this commit fixes that. --- Examples/bash/Makefile | 6 +++--- Examples/capnproto/Makefile | 4 ++-- Examples/curl/Makefile | 4 ++-- Examples/nodejs-express-server/Makefile | 4 ++-- Examples/nodejs/Makefile | 4 ++-- Examples/openvino/Makefile | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Examples/bash/Makefile b/Examples/bash/Makefile index 6ee79b49..d14987ed 100644 --- a/Examples/bash/Makefile +++ b/Examples/bash/Makefile @@ -12,7 +12,7 @@ PROGRAMS = ls cat rm cp date # Relative path to Graphene root and key for enclave signing GRAPHENEDIR ?= ../.. -GRAPHENEKEY ?= $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/enclave-key.pem +SGX_SIGNER_KEY ?= $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/enclave-key.pem ifeq ($(DEBUG),1) GRAPHENEDEBUG = inline @@ -91,7 +91,7 @@ $(addsuffix .manifest,$(PROGRAMS)): %.manifest: manifest.template %.trusted-libs bash.manifest.sgx: bash.manifest $(addsuffix .manifest.sgx,$(PROGRAMS)) $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/pal-sgx-sign \ -libpal $(GRAPHENEDIR)/Runtime/libpal-Linux-SGX.so \ - -key $(GRAPHENEKEY) \ + -key $(SGX_SIGNER_KEY) \ -manifest $< -output $@ bash.sig: bash.manifest.sgx @@ -103,7 +103,7 @@ bash.token: bash.sig $(addsuffix .manifest.sgx,$(PROGRAMS)): %.manifest.sgx: %.manifest $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/pal-sgx-sign \ -libpal $(GRAPHENEDIR)/Runtime/libpal-Linux-SGX.so \ - -key $(GRAPHENEKEY) \ + -key $(SGX_SIGNER_KEY) \ -manifest $< -output $@ $(addsuffix .sig,$(PROGRAMS)): %.sig: %.manifest.sgx diff --git a/Examples/capnproto/Makefile b/Examples/capnproto/Makefile index 43530aeb..d67c665f 100644 --- a/Examples/capnproto/Makefile +++ b/Examples/capnproto/Makefile @@ -13,7 +13,7 @@ # Relative path to Graphene root and key for enclave signing GRAPHENEDIR ?= ../.. -GRAPHENEKEY ?= $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/enclave-key.pem +SGX_SIGNER_KEY ?= $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/enclave-key.pem SRCDIR = src CAPNPROTO_SRC_URL ?= https://raw.githubusercontent.com/capnproto/capnproto/v0.7.0 @@ -86,7 +86,7 @@ addressbook.manifest: addressbook.manifest.template addressbook-trusted-libs addressbook.manifest.sgx: addressbook.manifest $(SRCDIR)/addressbook $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/pal-sgx-sign \ -libpal $(GRAPHENEDIR)/Runtime/libpal-Linux-SGX.so \ - -key $(GRAPHENEKEY) \ + -key $(SGX_SIGNER_KEY) \ -manifest $< -output $@ \ -exec $(SRCDIR)/addressbook diff --git a/Examples/curl/Makefile b/Examples/curl/Makefile index c5e5e231..b3795f68 100644 --- a/Examples/curl/Makefile +++ b/Examples/curl/Makefile @@ -12,7 +12,7 @@ CURL_DIR ?= /usr/bin/ # Relative path to Graphene root and key for enclave signing GRAPHENEDIR ?= ../.. -GRAPHENEKEY ?= $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/enclave-key.pem +SGX_SIGNER_KEY ?= $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/enclave-key.pem ifeq ($(DEBUG),1) GRAPHENEDEBUG = inline @@ -64,7 +64,7 @@ curl.manifest: curl.manifest.template curl-trusted-libs curl.manifest.sgx: curl.manifest $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/pal-sgx-sign \ -libpal $(GRAPHENEDIR)/Runtime/libpal-Linux-SGX.so \ - -key $(GRAPHENEKEY) \ + -key $(SGX_SIGNER_KEY) \ -manifest $< -output $@ curl.sig: curl.manifest.sgx diff --git a/Examples/nodejs-express-server/Makefile b/Examples/nodejs-express-server/Makefile index 6b83890a..98478781 100644 --- a/Examples/nodejs-express-server/Makefile +++ b/Examples/nodejs-express-server/Makefile @@ -12,7 +12,7 @@ NODEJS_DIR ?= /usr/bin/ # Relative path to Graphene root and key for enclave signing GRAPHENEDIR ?= ../.. -GRAPHENEKEY ?= $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/enclave-key.pem +SGX_SIGNER_KEY ?= $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/enclave-key.pem ifeq ($(DEBUG),1) GRAPHENEDEBUG = inline @@ -64,7 +64,7 @@ nodejs.manifest: nodejs.manifest.template nodejs-trusted-libs nodejs.manifest.sgx: nodejs.manifest $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/pal-sgx-sign \ -libpal $(GRAPHENEDIR)/Runtime/libpal-Linux-SGX.so \ - -key $(GRAPHENEKEY) \ + -key $(SGX_SIGNER_KEY) \ -manifest $< -output $@ nodejs.sig: nodejs.manifest.sgx diff --git a/Examples/nodejs/Makefile b/Examples/nodejs/Makefile index 8df11c35..866b457d 100644 --- a/Examples/nodejs/Makefile +++ b/Examples/nodejs/Makefile @@ -12,7 +12,7 @@ NODEJS_DIR ?= /usr/bin/ # Relative path to Graphene root and key for enclave signing GRAPHENEDIR ?= ../.. -GRAPHENEKEY ?= $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/enclave-key.pem +SGX_SIGNER_KEY ?= $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/enclave-key.pem ifeq ($(DEBUG),1) GRAPHENEDEBUG = inline @@ -64,7 +64,7 @@ nodejs.manifest: nodejs.manifest.template nodejs-trusted-libs nodejs.manifest.sgx: nodejs.manifest $(GRAPHENEDIR)/Pal/src/host/Linux-SGX/signer/pal-sgx-sign \ -libpal $(GRAPHENEDIR)/Runtime/libpal-Linux-SGX.so \ - -key $(GRAPHENEKEY) \ + -key $(SGX_SIGNER_KEY) \ -manifest $< -output $@ nodejs.sig: nodejs.manifest.sgx diff --git a/Examples/openvino/Makefile b/Examples/openvino/Makefile index 57531e94..5d687665 100644 --- a/Examples/openvino/Makefile +++ b/Examples/openvino/Makefile @@ -20,7 +20,7 @@ OPENVINO_COMMIT ?= ba6e22b1b5ee4cbefcc30e8d9493cddb0bb3dfdf # corresponds to ta # Relative path to Graphene root and key for enclave signing GRAPHENE_DIR ?= ../.. -GRAPHENE_KEY ?= $(GRAPHENE_DIR)/Pal/src/host/Linux-SGX/signer/enclave-key.pem +SGX_SIGNER_KEY ?= $(GRAPHENE_DIR)/Pal/src/host/Linux-SGX/signer/enclave-key.pem ifeq ($(DEBUG),1) GRAPHENE_DEBUG = inline @@ -79,7 +79,7 @@ openvino.manifest: openvino.manifest.template openvino.manifest.sgx: openvino.manifest $(GRAPHENE_DIR)/Pal/src/host/Linux-SGX/signer/pal-sgx-sign \ -libpal $(GRAPHENE_DIR)/Runtime/libpal-Linux-SGX.so \ - -key $(GRAPHENE_KEY) \ + -key $(SGX_SIGNER_KEY) \ -manifest $< -output $@ openvino.sig: openvino.manifest.sgx