Skip to content

Commit

Permalink
Port to sgx 1.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dingelish committed Dec 14, 2020
1 parent 7e6d4b4 commit f79cfbf
Show file tree
Hide file tree
Showing 98 changed files with 7,526 additions and 24 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: http_req-sgx-xargo-1604-sw

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

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

node:
instance: sgx

---

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

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

- name: hw-test
image: baiduxlab/sgx-rust:1604-1.1.3
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/http_req-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: http_req-sgx-xargo-1804-sw

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

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

node:
instance: sgx

---

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

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

- name: hw-test
image: baiduxlab/sgx-rust:1804-1.1.3
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/http_req-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: http_req-sgx-1604-sw

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

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

node:
instance: sgx

---

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

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

- name: hw-test
image: baiduxlab/sgx-rust:1604-1.1.3
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/http_req-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: http_req-sgx-1804-sw

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

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

node:
instance: sgx

---

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

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

- name: hw-test
image: baiduxlab/sgx-rust:1804-1.1.3
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/http_req-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: jayjamesjay:master
mergeMethod: none
15 changes: 0 additions & 15 deletions .github/workflows/rust.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/target
**/*.rs.bk
/.idea
/.idea
Cargo.lock
19 changes: 14 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,37 @@ readme = "README.md"
categories = ["web-programming::http-client", "network-programming"]
keywords = ["http", "client", "request"]
edition = "2018"
exclude = [ "sgx/*", ]

[dependencies]
unicase = "^2.6"
unicase = { git = "https://github.com/mesalock-linux/unicase-sgx" }
sgx_tstd = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git", optional = true ,features = ["net", "untrusted_time"]}

[features]
default = ["native-tls"]
default = ["rust-tls", "mesalock_sgx"]
rust-tls = ["rustls", "webpki", "webpki-roots"]
mesalock_sgx = ["sgx_tstd"]

[dependencies.native-tls]
version = "^0.2"
optional = true
#[dependencies.native-tls]
#version = "^0.2"
#optional = true

[dependencies.rustls]
version = "^0.19"
git = "https://github.com/mesalock-linux/rustls"
branch = "mesalock_sgx"
optional = true

[dependencies.webpki]
version = "^0.21"
git = "https://github.com/mesalock-linux/webpki"
branch = "mesalock_sgx"
optional = true

[dependencies.webpki-roots]
version = "^0.21"
git = "https://github.com/mesalock-linux/webpki-roots"
branch = "mesalock_sgx"
optional = true

[badges]
Expand Down
Loading

0 comments on commit f79cfbf

Please sign in to comment.