Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sgxwallet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董子豪
sgxwallet
Commits
68533b09
Unverified
Commit
68533b09
authored
Jan 20, 2020
by
Stan Kladko
Committed by
GitHub
Jan 20, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #28 from skalenetwork/SKALE-2012-sgx-simulation
Skale 2012 sgx simulation
parents
9270b3cb
e3c4a605
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
110 additions
and
7 deletions
+110
-7
dockerimagesim.yml
.github/workflows/dockerimagesim.yml
+16
-0
DockerfileSimulation
DockerfileSimulation
+75
-0
Makefile.am
Makefile.am
+1
-1
README.md
README.md
+18
-6
No files found.
.github/workflows/dockerimagesim.yml
0 → 100644
View file @
68533b09
name
:
Docker Image CI
on
:
[
push
]
jobs
:
build
:
runs-on
:
ubuntu-latest
steps
:
-
uses
:
actions/checkout@v1
-
name
:
submodule update
run
:
git submodule update --init --recursive
-
name
:
Build the Docker image
run
:
docker build . --file DockerfileSimulation --tag sgxcontainer:$(date +%s)
DockerfileSimulation
0 → 100644
View file @
68533b09
FROM ubuntu:bionic
WORKDIR /usr/src/sdk
COPY *.cpp ./
COPY *.h ./
COPY *.txt ./
COPY *.c ./
COPY *.am ./
COPY *.hpp ./
COPY *.sh ./
COPY *.m4 ./
COPY *.gmp ./
COPY *.ac ./
COPY *.json ./
COPY docker ./docker
COPY build-aux ./build-aux
COPY cert ./cert
COPY intel-sgx-ssl ./intel-sgx-ssl
COPY jsonrpc ./jsonrpc
COPY leveldb ./leveldb
COPY libBLS ./libBLS
COPY m4 ./m4
COPY scripts ./scripts
COPY secure_enclave ./secure_enclave
COPY sgx-gmp ./sgx-gmp
COPY sgx-software-enable ./sgx-software-enable
COPY trusted_libff ./trusted_libff
RUN rm -rf /usr/src/sdk/leveldb/build/
RUN apt-get update && apt-get install -yq --no-install-recommends python-yaml vim telnet git ca-certificates build-essential ocaml ocamlbuild automake autoconf libtool wget python libssl-dev libssl-dev libcurl4-openssl-dev protobuf-compiler git libprotobuf-dev alien cmake debhelper uuid-dev libxml2-dev
RUN apt install -y libprotobuf10 yasm cmake flex bison libprocps-dev ccache autoconf texinfo libssl-dev libboost-all-dev libjsonrpccpp-dev libjsonrpccpp-tools
COPY docker/install-psw.patch ./
RUN git clone -b sgx_2.5 --depth 1 https://github.com/intel/linux-sgx && \
cd linux-sgx && \
patch -p1 -i ../install-psw.patch && \
./download_prebuilt.sh 2> /dev/null && \
make -s -j$(nproc) sdk_install_pkg psw_install_pkg && \
./linux/installer/bin/sgx_linux_x64_sdk_2.5.100.49891.bin --prefix=/opt/intel && \
./linux/installer/bin/sgx_linux_x64_psw_2.5.100.49891.bin && \
cd .. && rm -rf linux-sgx/
# For debug purposes
# COPY docker/jhi.conf /etc/jhi/jhi.conf
COPY configure.gmp ./
RUN cd scripts; ./build.py
### RUN autoreconf -vif
### RUN automake
RUN autoreconf -vif
RUN libtoolize --force
RUN aclocal
RUN autoheader || true
RUN automake --force-missing --add-missing
RUN autoconf
RUN ./configure --enable-sgx-simulation
### RUN cd libBLS; cmake -H. -Bbuild; cmake --build build -- -j$(nproc);
RUN make
RUN wget --progress=dot:mega -O - https://github.com/intel/dynamic-application-loader-host-interface/archive/072d233296c15d0dcd1fb4570694d0244729f87b.tar.gz | tar -xz && \
cd dynamic-application-loader-host-interface-072d233296c15d0dcd1fb4570694d0244729f87b && \
cmake . -DCMAKE_BUILD_TYPE=Release -DINIT_SYSTEM=SysVinit && \
make install && \
cd .. && rm -rf dynamic-application-loader-host-interface-072d233296c15d0dcd1fb4570694d0244729f87b
COPY docker/start.sh ./
Makefile.am
View file @
68533b09
...
...
@@ -8,7 +8,7 @@ include $(top_srcdir)/build-aux/sgx_app.am
## AM_CPPFLAGS = -I$(SGXSDK_INCDIR)
## AM_LDFLAGS = -L$(SGXSDK_LIBDIR)
##
## And a pattern rule for building proxy functions from EDL files:
## And a pattern rule for building pr
ex
oxy functions from EDL files:
##
## %_u.h %_u.c: %.edl
##
...
...
README.md
View file @
68533b09
...
...
@@ -16,7 +16,6 @@ This sgxwallet library is still in active development and therefore should be re
```
bash
sudo
apt-get
install
build-essential make cmake gcc g++ yasm python libprotobuf10 flex bison automake libtool texinfo libgcrypt20-dev libgnutls28-dev
```
## Clone this repository and its submodules
...
...
@@ -88,22 +87,31 @@ make
```
Note: to run in simulation mode, add --enable-sgx-simulation flag when you run configure.
```
./configure --enable-sgx-simulation
```
## Running sgxwallet
Type:
```
bash
`
./sgxwallet
`
./sgxwallet
```
## Build Docker container
```
bash
sudo
apt-get
install
-y
docker.io
;
cd
docker
;
sudo
docker build
-t
sgxcontainer
.
```
## Build Docker container in simulation mode
```
`bash
sudo docker build -t sgxcontainersim -f ./DockerfileSimulation .
```
## Run Docker container
...
...
@@ -114,7 +122,6 @@ Then run
```
bash
sudo
docker run
-di
--network
host
--device
/dev/isgx
--device
/dev/mei0
--name
sgxwallet sgxcontainer ./start.sh
```
This will run the server in a Docker container named sgxwallet
...
...
@@ -126,9 +133,15 @@ You can start and stop running sgxwallet container by doing
```
bash
docker stop sgxwallet
docker start sgxwallet
```
## Run Docker container in simulation mode
```
bash
sudo
docker run
-di
--network
host
--name
sgxwalletsim sgxcontainersim ./start.sh
```
## Development
Note that
`configure, Makefile`
and
`Makefile.in`
files are created by
`automake`
tools on the fly.
...
...
@@ -152,7 +165,6 @@ cat $KEY_FILE
export
KEY_PEM_FILE
=
k.pem
openssl rsa
-in
$KEY_FILE
-text
>
$KEY_PEM_FILE
cat
$KEY_PEM_FILE
```
Next, send content of
`a.csr`
as single line (by replacing real end of lines with
`\n`
) to port
`1027`
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment