Skip to content

Commit

Permalink
Port to sgx 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dingelish committed Jan 27, 2020
1 parent 6f76de0 commit 4561619
Show file tree
Hide file tree
Showing 82 changed files with 6,418 additions and 36 deletions.
237 changes: 237 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
kind: pipeline
name: RSA-sgx-xargo-1604-sw

steps:
- name: sim-compile
image: baiduxlab/sgx-rust:1604-1.1.0
commands:
- . /opt/sgxsdk/environment
- . /root/.cargo/env
- cd sgx && SGX_MODE=SW XARGO_SGX=1 make -C RSA-sgx-test

- name: sim-test
image: baiduxlab/sgx-rust:1604-1.1.0
commands:
- . /opt/sgxsdk/environment
- cd sgx/RSA-sgx-test/bin && ./app | tee result.txt && grep " 0 failed" result.txt

node:
instance: sgx

---

kind: pipeline
name: RSA-sgx-xargo-1604-hw

steps:
- name: hw-compile
image: baiduxlab/sgx-rust:1604-1.1.0
commands:
- . /opt/sgxsdk/environment
- . /root/.cargo/env
- cd sgx && XARGO_SGX=1 make -C RSA-sgx-test

- name: hw-test
image: baiduxlab/sgx-rust:1604-1.1.0
privileged: true
volumes:
- name: isgx
path: /dev/isgx
- name: aesmd
path: /var/run/aesmd/aesm.socket
commands:
- . /opt/sgxsdk/environment
- ls -l /dev/isgx
- ls -l /var/run/aesmd/aesm.socket
- cd sgx/RSA-sgx-test/bin && ./app | tee result.txt && grep " 0 failed" result.txt

volumes:
- name: isgx
host:
path: /dev/isgx
- name: aesmd
host:
path: /var/run/aesmd/aesm.socket

node:
instance: sgx

---

kind: pipeline
name: RSA-sgx-xargo-1804-sw

steps:
- name: sim-compile
image: baiduxlab/sgx-rust:1804-1.1.0
commands:
- . /opt/sgxsdk/environment
- . /root/.cargo/env
- cd sgx && SGX_MODE=SW XARGO_SGX=1 make -C RSA-sgx-test

- name: sim-test
image: baiduxlab/sgx-rust:1804-1.1.0
commands:
- . /opt/sgxsdk/environment
- cd sgx/RSA-sgx-test/bin && ./app | tee result.txt && grep " 0 failed" result.txt

node:
instance: sgx

---

kind: pipeline
name: RSA-sgx-xargo-1804-hw

steps:
- name: hw-compile
image: baiduxlab/sgx-rust:1804-1.1.0
commands:
- . /opt/sgxsdk/environment
- . /root/.cargo/env
- cd sgx && XARGO_SGX=1 make -C RSA-sgx-test

- name: hw-test
image: baiduxlab/sgx-rust:1804-1.1.0
privileged: true
volumes:
- name: isgx
path: /dev/isgx
- name: aesmd
path: /var/run/aesmd/aesm.socket
commands:
- . /opt/sgxsdk/environment
- ls -l /dev/isgx
- ls -l /var/run/aesmd/aesm.socket
- cd sgx/RSA-sgx-test/bin && ./app | tee result.txt && grep " 0 failed" result.txt

volumes:
- name: isgx
host:
path: /dev/isgx
- name: aesmd
host:
path: /var/run/aesmd/aesm.socket

node:
instance: sgx

---

kind: pipeline
name: RSA-sgx-1604-sw

steps:
- name: sim-compile
image: baiduxlab/sgx-rust:1604-1.1.0
commands:
- . /opt/sgxsdk/environment
- . /root/.cargo/env
- SGX_MODE=SW make -C sgx/RSA-sgx-test

- name: sim-test
image: baiduxlab/sgx-rust:1604-1.1.0
commands:
- . /opt/sgxsdk/environment
- cd sgx/RSA-sgx-test/bin && ./app | tee result.txt && grep " 0 failed" result.txt

node:
instance: sgx

---

kind: pipeline
name: RSA-sgx-1604-hw

steps:
- name: hw-compile
image: baiduxlab/sgx-rust:1604-1.1.0
commands:
- . /opt/sgxsdk/environment
- . /root/.cargo/env
- make -C sgx/RSA-sgx-test

- name: hw-test
image: baiduxlab/sgx-rust:1604-1.1.0
privileged: true
volumes:
- name: isgx
path: /dev/isgx
- name: aesmd
path: /var/run/aesmd/aesm.socket
commands:
- . /opt/sgxsdk/environment
- ls -l /dev/isgx
- ls -l /var/run/aesmd/aesm.socket
- cd sgx/RSA-sgx-test/bin && ./app | tee result.txt && grep " 0 failed" result.txt

volumes:
- name: isgx
host:
path: /dev/isgx
- name: aesmd
host:
path: /var/run/aesmd/aesm.socket

node:
instance: sgx

---

kind: pipeline
name: RSA-sgx-1804-sw

steps:
- name: sim-compile
image: baiduxlab/sgx-rust:1804-1.1.0
commands:
- . /opt/sgxsdk/environment
- . /root/.cargo/env
- SGX_MODE=SW make -C sgx/RSA-sgx-test

- name: sim-test
image: baiduxlab/sgx-rust:1804-1.1.0
commands:
- . /opt/sgxsdk/environment
- cd sgx/RSA-sgx-test/bin && ./app | tee result.txt && grep " 0 failed" result.txt

node:
instance: sgx

---

kind: pipeline
name: RSA-sgx-1804-hw

steps:
- name: hw-compile
image: baiduxlab/sgx-rust:1804-1.1.0
commands:
- . /opt/sgxsdk/environment
- . /root/.cargo/env
- make -C sgx/RSA-sgx-test

- name: hw-test
image: baiduxlab/sgx-rust:1804-1.1.0
privileged: true
volumes:
- name: isgx
path: /dev/isgx
- name: aesmd
path: /var/run/aesmd/aesm.socket
commands:
- . /opt/sgxsdk/environment
- ls -l /dev/isgx
- ls -l /var/run/aesmd/aesm.socket
- cd sgx/RSA-sgx-test/bin && ./app | tee result.txt && grep " 0 failed" result.txt

volumes:
- name: isgx
host:
path: /dev/isgx
- name: aesmd
host:
path: /var/run/aesmd/aesm.socket

node:
instance: sgx
5 changes: 5 additions & 0 deletions .github/pull.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: "1"
rules:
- base: master
upstream: RustCrypto:master
mergeMethod: none
41 changes: 22 additions & 19 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,35 @@ categories = ["cryptography"]
readme = "README.md"

[dependencies]
num-bigint = { version = "0.6", features = ["rand", "i128", "u64_digit", "prime", "zeroize"], package = "num-bigint-dig" }
num-traits = "0.2.6"
num-integer = "0.1.39"
num-iter = "0.1.37"
lazy_static = "1.3.0"
rand = "0.7.0"
byteorder = "1.3.1"
failure = "0.1.5"
subtle = "2.0.0"
num-bigint = { package = "num-bigint-dig", version = "0.6", features = ["rand", "i128", "u64_digit", "prime", "zeroize"], git = "https://github.com/mesalock-linux/num-bigint-sgx", branch = "dig" }
num-traits = { git = "https://github.com/mesalock-linux/num-traits-sgx" }
num-integer = { git = "https://github.com/mesalock-linux/num-integer-sgx" }
num-iter = {git = "https://github.com/mesalock-linux/num-iter-sgx" }
lazy_static = { version = "1.3.0", default-features = false, features = ["spin_no_std"] }
rand = { git = "https://github.com/mesalock-linux/rand-sgx", tag = "v0.6.5_sgx1.1.0" }
byteorder = { git = "https://github.com/mesalock-linux/byteorder-sgx" }
#failure= { git = "https://github.com/mesalock-linux/failure-sgx" }
subtle = { git = "https://github.com/mesalock-linux/subtle-sgx" }
sgx_tstd = { rev = "v1.1.0", git = "https://github.com/apache/teaclave-sgx-sdk.git", optional = true }

[dependencies.zeroize]
version = "1.1.0"
features = ["alloc", "zeroize_derive"]

[dependencies.serde]
optional = true
version = "1.0.89"
default-features = false
features = ["std", "derive"]
version = "1.0.99"
#default-features = false
#features = ["std", "derive"]
git = "https://github.com/mesalock-linux/serde-sgx"

[dev-dependencies]
base64 = "0.11.0"
sha-1 = "0.8.1"
sha2 = "0.8.0"
hex = "0.4.0"
serde_test = "1.0.89"
rand_xorshift = "0.2.0"
#base64 = "0.11.0"
#sha-1 = "0.8.1"
#sha2 = "0.8.0"
#hex = "0.4.0"
#serde_test = "1.0.89"
#rand_xorshift = "0.2.0"


[[bench]]
Expand All @@ -51,7 +53,8 @@ name = "key"
# debug = true

[features]
default = []
default = ["mesalock_sgx"]
nightly = ["subtle/nightly", "num-bigint/nightly"]
serde1 = ["num-bigint/serde", "serde"]
expose-internals = []
mesalock_sgx = ["sgx_tstd"]
Loading

0 comments on commit 4561619

Please sign in to comment.