-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provided standalone Intel(R) SGX DCAP Quote verification library installer. Provided standalone Intel(R) SGX DCAP Platform Certificate ID retrieval tool installation package. Fixed bugs. Signed-off-by: Li, Xun <xun.li@intel.com>
- Loading branch information
Showing
115 changed files
with
1,806 additions
and
538 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
QuoteGeneration/installer/linux/common/libsgx-dcap-ql/BOMs/libsgx-dcap-ql.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
DeliveryName InstallName FileCheckSum FileFeature FileOwner | ||
<deliverydir>/build/linux/libsgx_dcap_ql.so <installdir>/lib/libsgx_dcap_ql.so 0 main STP | ||
<deliverydir>/build/linux/libsgx_dcap_quoteverify.so <installdir>/lib/libsgx_dcap_quoteverify.so 0 main STP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
...neration/installer/linux/common/libsgx-dcap-quote-verify/BOMs/libsgx-dcap-qvl-package.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
DeliveryName InstallName FileCheckSum FileFeature FileOwner | ||
<deliverydir>/installer/linux/common/libsgx-dcap-quote-verify/installConfig <installdir>/installConfig 0 main STP | ||
<deliverydir>/installer/linux/common/libsgx-dcap-quote-verify/Makefile <installdir>/Makefile 0 main STP |
2 changes: 2 additions & 0 deletions
2
QuoteGeneration/installer/linux/common/libsgx-dcap-quote-verify/BOMs/libsgx-dcap-qvl.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
DeliveryName InstallName FileCheckSum FileFeature FileOwner | ||
<deliverydir>/build/linux/libsgx_dcap_quoteverify.so <installdir>/lib/libsgx_dcap_quoteverify.so 0 main STP |
60 changes: 60 additions & 0 deletions
60
QuoteGeneration/installer/linux/common/libsgx-dcap-quote-verify/Makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# | ||
# Copyright (C) 2011-2020 Intel Corporation. All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions | ||
# are met: | ||
# | ||
# * Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# * Redistributions in binary form must reproduce the above copyright | ||
# notice, this list of conditions and the following disclaimer in | ||
# the documentation and/or other materials provided with the | ||
# distribution. | ||
# * Neither the name of Intel Corporation nor the names of its | ||
# contributors may be used to endorse or promote products derived | ||
# from this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
# | ||
# | ||
|
||
include installConfig | ||
|
||
PACKAGE_ROOT_FOLDER=pkgroot | ||
PACKAGES=$(notdir $(wildcard $(PACKAGE_ROOT_FOLDER)/*)) | ||
|
||
USR_LIB_PATH=/usr/$(notdir $(shell gcc -print-multi-os-directory))/$(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null) | ||
USR_INC_PATH=/usr/$(INC_DIR) | ||
|
||
USR_LIB_VER=1.0.0 | ||
SPLIT_VERSION=$(word $2,$(subst ., ,$1)) | ||
|
||
default: | ||
|
||
install: $(PACKAGES) | ||
cd $(shell readlink -m $(DESTDIR)/$(DCAP_QVL_PACKAGE_NAME)/$(USR_LIB_PATH)) && \ | ||
mv libsgx_dcap_quoteverify.so libsgx_dcap_quoteverify.so.$(USR_LIB_VER) && \ | ||
ln -fs libsgx_dcap_quoteverify.so.$(USR_LIB_VER) libsgx_dcap_quoteverify.so.$(call SPLIT_VERSION,$(USR_LIB_VER),1) | ||
cd $(shell readlink -m $(DESTDIR)/$(DCAP_QVL_DEV_PACKAGE_NAME)/$(USR_LIB_PATH)) && \ | ||
ln -fs libsgx_dcap_quoteverify.so.$(call SPLIT_VERSION,$(USR_LIB_VER),1) libsgx_dcap_quoteverify.so | ||
|
||
$(PACKAGES): | ||
install -d $(shell readlink -m $(DESTDIR)/$@) | ||
$(if $(wildcard $(PACKAGE_ROOT_FOLDER)/$@/$(LIB_DIR)/*.so), \ | ||
install -d $(shell readlink -m $(DESTDIR)/$@/$(USR_LIB_PATH)) && \ | ||
mv $(PACKAGE_ROOT_FOLDER)/$@/$(LIB_DIR)/*.so $(DESTDIR)/$@/$(USR_LIB_PATH)) | ||
$(if $(wildcard $(PACKAGE_ROOT_FOLDER)/$@/$(INC_DIR)/.*), \ | ||
install -d $(shell readlink -m $(DESTDIR)/$@/$(USR_INC_PATH)) && \ | ||
install -d $(shell readlink -m $(DESTDIR)/$@/$(USR_LIB_PATH)) && \ | ||
mv $(PACKAGE_ROOT_FOLDER)/$@/$(INC_DIR)/* $(DESTDIR)/$@/$(USR_INC_PATH)) |
66 changes: 66 additions & 0 deletions
66
QuoteGeneration/installer/linux/common/libsgx-dcap-quote-verify/createTarball.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright (C) 2011-2020 Intel Corporation. All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions | ||
# are met: | ||
# | ||
# * Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# * Redistributions in binary form must reproduce the above copyright | ||
# notice, this list of conditions and the following disclaimer in | ||
# the documentation and/or other materials provided with the | ||
# distribution. | ||
# * Neither the name of Intel Corporation nor the names of its | ||
# contributors may be used to endorse or promote products derived | ||
# from this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
# | ||
# | ||
|
||
|
||
set -e | ||
|
||
SCRIPT_DIR=$(dirname "$0") | ||
ROOT_DIR="${SCRIPT_DIR}/../../../../" | ||
LINUX_INSTALLER_DIR="${ROOT_DIR}/installer/linux" | ||
LINUX_INSTALLER_COMMON_DIR="${LINUX_INSTALLER_DIR}/common" | ||
|
||
INSTALL_PATH=${SCRIPT_DIR}/output | ||
|
||
LINUX_QV_DIR="${ROOT_DIR}/../QuoteVerification" | ||
[[ -z "${SGX_SDK}" ]] && SGX_SDK=/opt/intel/sgxsdk | ||
|
||
# Cleanup | ||
rm -fr ${INSTALL_PATH} | ||
|
||
# Get the configuration for this package | ||
source ${SCRIPT_DIR}/installConfig | ||
|
||
# Fetch the gen_source script | ||
cp ${LINUX_INSTALLER_COMMON_DIR}/gen_source/gen_source.py ${SCRIPT_DIR} | ||
|
||
# Copy the files according to the BOM | ||
python ${SCRIPT_DIR}/gen_source.py --bom=BOMs/libsgx-dcap-qvl.txt --installdir=pkgroot/libsgx-dcap-quote-verify | ||
python ${SCRIPT_DIR}/gen_source.py --bom=BOMs/libsgx-dcap-ql-dev-qvinc.txt --deliverydir=${LINUX_QV_DIR} --cleanup=false --installdir=pkgroot/libsgx-dcap-quote-verify-dev | ||
python ${SCRIPT_DIR}/gen_source.py --bom=BOMs/libsgx-dcap-qvl-package.txt --cleanup=false | ||
python ${SCRIPT_DIR}/gen_source.py --bom=../licenses/BOM_license.txt --cleanup=false | ||
|
||
# Create the tarball | ||
SGX_VERSION=$(awk '/STRFILEVER/ {print $3}' ${ROOT_DIR}/common/inc/internal/se_version.h|sed 's/^\"\(.*\)\"$/\1/') | ||
pushd ${INSTALL_PATH} &> /dev/null | ||
sed -i "s/USR_LIB_VER=.*/USR_LIB_VER=${SGX_VERSION}/" Makefile | ||
tar -zcvf ${TARBALL_NAME} * | ||
popd &> /dev/null |
8 changes: 8 additions & 0 deletions
8
QuoteGeneration/installer/linux/common/libsgx-dcap-quote-verify/installConfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
DCAP_QVL_VERSION="1.0" | ||
TARBALL_NAME=libsgx-dcap-quote-verify_1.0.orig.tar.gz | ||
|
||
DCAP_QVL_PACKAGE_NAME=libsgx-dcap-quote-verify | ||
DCAP_QVL_DEV_PACKAGE_NAME=libsgx-dcap-quote-verify-dev | ||
|
||
LIB_DIR=lib | ||
INC_DIR=include |
Oops, something went wrong.