Skip to content
This repository was archived by the owner on Jan 27, 2022. It is now read-only.

Commit 235402f

Browse files
manju956karthikamurthy
authored andcommitted
Refactor EPID changes
- Worker specific swig files for attestation - Created ias folder under common/verify_report_utils and moved all the files - Renamed verify-report files to verify-ias-report - Moved common function code block for VerifyEnclaveInfo to epid_signup_helper.cpp This PR changes are pre-requisite for DCAP related changes Signed-off-by: manju956 <[email protected]>
1 parent 65853e7 commit 235402f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+870
-764
lines changed

ci/docker-compose-direct-model.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ services:
4646
- ENCLAVE_TYPE=singleton
4747
- IMAGE=$IMAGE
4848
- DISTRO=$DISTRO
49+
- ATTESTATION_TYPE=epid
4950
command: |
5051
bash -c "
5152
enclave_manager --lmdb_url http://avalon-lmdb:9090

common/cpp/verify_ias_report/ias_attestation_util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <string.h>
2020

2121
#include "ias_attestation_util.h"
22-
#include "verify-report.h"
22+
#include "verify-ias-report.h"
2323
#include "tcf_error.h"
2424
#include "parson.h"
2525
#include "jsonvalue.h"

common/cpp/verify_ias_report/verify-report.cpp renamed to common/cpp/verify_ias_report/verify-ias-report.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <stdlib.h>
1818
#include <string.h>
1919

20-
#include "verify-report.h"
20+
#include "verify-ias-report.h"
2121
#include "verify_certificate.h"
2222
#include "verify_signature.h"
2323
#include "c11_support.h"
File renamed without changes.

common/verify_report_utils/Makefile renamed to common/verify_report_utils/ias/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
# limitations under the License.
1414

1515
PY_VERSION=${shell python3 --version | sed 's/Python \(3\.[0-9]\).*/\1/' | tr -d .}
16-
MOD_VERSION=${shell ../../bin/get_version}
16+
MOD_VERSION=${shell ../../../bin/get_version}
1717

1818
# Format of wheel package is <pkg_name>-{python-tag}-{abi-tag}-{platform}
19-
WHEEL_FILE=dist/avalon_verify_report_utils-${MOD_VERSION}-cp${PY_VERSION}-cp${PY_VERSION}m-linux_x86_64.whl
19+
WHEEL_FILE=dist/avalon_verify_ias_report_utils-${MOD_VERSION}-cp${PY_VERSION}-cp${PY_VERSION}m-linux_x86_64.whl
2020
SOURCE_DIR=$(shell pwd)
2121

2222

common/verify_report_utils/setup.py renamed to common/verify_report_utils/ias/setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
sys.exit(1)
2828

2929

30-
tcf_root_dir = os.environ.get('TCF_HOME', '../..')
30+
tcf_root_dir = os.environ.get('TCF_HOME', '../../..')
3131

3232
version = subprocess.check_output(
3333
os.path.join(tcf_root_dir, 'bin/get_version')).decode('ascii').strip()
@@ -83,7 +83,7 @@
8383
]
8484

8585
verify_report_module = Extension(
86-
'verify_report._verify_report',
86+
'verify_report._ias_verify_report',
8787
verify_report_modulefiles,
8888
swig_opts=['-c++'] + ['-I%s' % i for i in verify_report_include_dirs],
8989
extra_compile_args=compile_args,
@@ -93,9 +93,9 @@
9393

9494
# -----------------------------------------------------------------
9595
setup(
96-
name='avalon_verify_report_utils',
96+
name='avalon_verify_ias_report_utils',
9797
version=version,
98-
description='Avalon Verify Report Utils Library',
98+
description='Avalon Verify IAS Report Utils Library',
9999
author='Hyperledger Avalon',
100100
url='https://github.com/hyperledger/avalon',
101101
packages=find_packages(),
File renamed without changes.

common/verify_report_utils/verify_report/verify_attestation_report.py renamed to common/verify_report_utils/ias/verify_report/verify_attestation_report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import json
1616
import logging
17-
import verify_report.verify_report as verify_report_util
17+
import verify_report.ias_verify_report as verify_report_util
1818
from error_code.error_status import QuoteStatus
1919

2020
logger = logging.getLogger(__name__)

common/verify_report_utils/verify_report/verify_report.i renamed to common/verify_report_utils/ias/verify_report/verify_report.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* limitations under the License.
1414
*/
1515

16-
%module verify_report
16+
%module ias_verify_report
1717

1818
%{
1919
#include "types.h"

docker/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,11 @@ WORKDIR /project/avalon/common/crypto_utils
196196
RUN echo "Building Avalon Common Crypto Python\n" \
197197
&& make
198198

199-
COPY ./common/verify_report_utils /project/avalon/common/verify_report_utils
199+
COPY ./common/verify_report_utils/ias /project/avalon/common/verify_report_utils/ias
200200

201-
WORKDIR /project/avalon/common/verify_report_utils
201+
WORKDIR /project/avalon/common/verify_report_utils/ias
202202

203-
RUN echo "Building Avalon Verify Report Utils\n" \
203+
RUN echo "Building Avalon Verify IAS Report Utils\n" \
204204
&& make
205205

206206
# -------------=== Avalon SDK build ===-------------
@@ -276,7 +276,7 @@ COPY ./sdk/avalon_sdk/connector/blockchains/ethereum/contracts /project/avalon/s
276276
# Copy Python build artifacts
277277
COPY --from=common_python_image /project/avalon/common/python/dist/*.whl dist/
278278
COPY --from=common_crypto_utils_image /project/avalon/common/crypto_utils/dist/*.whl dist/
279-
COPY --from=common_crypto_utils_image /project/avalon/common/verify_report_utils/dist/*.whl dist/
279+
COPY --from=common_crypto_utils_image /project/avalon/common/verify_report_utils/ias/dist/*.whl dist/
280280
COPY --from=avalon_sdk_image /project/avalon/sdk/dist/*.whl dist/
281281

282282
# Installing wheel file requires python3-pip package.

0 commit comments

Comments
 (0)