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 Dec 18, 2019
1 parent 30b57d7 commit 2a0f122
Show file tree
Hide file tree
Showing 11 changed files with 337 additions and 10 deletions.
101 changes: 101 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
kind: pipeline
name: utils-sgx-xargo-1604-release

steps:
- name: release-compile
image: baiduxlab/sgx-rust:1604-1.1.0
commands:
- . /opt/sgxsdk/environment
- . /root/.cargo/env
- RUST_TARGET_PATH=`pwd` xargo build --target x86_64-unknown-linux-sgx --release

---

kind: pipeline
name: utils-sgx-xargo-1604-debug

steps:
- name: debug-compile
image: baiduxlab/sgx-rust:1604-1.1.0
commands:
- . /opt/sgxsdk/environment
- . /root/.cargo/env
- RUST_TARGET_PATH=`pwd` xargo build --target x86_64-unknown-linux-sgx

---

kind: pipeline
name: utils-sgx-xargo-1804-release

steps:
- name: release-compile
image: baiduxlab/sgx-rust:1804-1.1.0
commands:
- . /opt/sgxsdk/environment
- . /root/.cargo/env
- RUST_TARGET_PATH=`pwd` xargo build --target x86_64-unknown-linux-sgx --release

---

kind: pipeline
name: utils-sgx-xargo-1804-debug

steps:
- name: debug-compile
image: baiduxlab/sgx-rust:1804-1.1.0
commands:
- . /opt/sgxsdk/environment
- . /root/.cargo/env
- RUST_TARGET_PATH=`pwd` xargo build --target x86_64-unknown-linux-sgx

---

kind: pipeline
name: utils-sgx-1604-release

steps:
- name: release-compile
image: baiduxlab/sgx-rust:1604-1.1.0
commands:
- . /opt/sgxsdk/environment
- . /root/.cargo/env
- cargo build --release

---

kind: pipeline
name: utils-sgx-1604-hw-debug

steps:
- name: debug-compile
image: baiduxlab/sgx-rust:1604-1.1.0
commands:
- . /opt/sgxsdk/environment
- . /root/.cargo/env
- cargo build

---

kind: pipeline
name: utils-sgx-1804-release

steps:
- name: release-compile
image: baiduxlab/sgx-rust:1804-1.1.0
commands:
- . /opt/sgxsdk/environment
- . /root/.cargo/env
- cargo build --release

---

kind: pipeline
name: utils-sgx-1804-debug

steps:
- name: debug-compile
image: baiduxlab/sgx-rust:1804-1.1.0
commands:
- . /opt/sgxsdk/environment
- . /root/.cargo/env
- cargo build
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
95 changes: 95 additions & 0 deletions Xargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
[dependencies]
alloc = {}

[dependencies.sgx_types]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 1

[dependencies.sgx_alloc]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 1

[dependencies.sgx_unwind]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 1

[dependencies.sgx_demangle]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 1

[dependencies.panic_abort]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 1

[dependencies.sgx_libc]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 2

[dependencies.sgx_tkey_exchange]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 2

[dependencies.sgx_tservice]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 2

[dependencies.sgx_tse]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 2

[dependencies.sgx_tcrypto]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 2

[dependencies.sgx_trts]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 3

[dependencies.sgx_backtrace_sys]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 3

[dependencies.panic_unwind]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 3

[dependencies.sgx_tdh]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 4

[dependencies.sgx_tseal]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 4

[dependencies.sgx_tprotected_fs]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 4

[dependencies.std]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
features = ["backtrace", "net"]
stage = 5

[dependencies.sgx_no_tstd]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 5

[dependencies.sgx_rand]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 6

[dependencies.sgx_serialize]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 6

[dependencies.sgx_tunittest]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 6

[dependencies.sgx_backtrace]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 7

[dependencies.sgx_cov]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 7
6 changes: 3 additions & 3 deletions blobby/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ repository = "https://github.com/RustCrypto/utils"
categories = ["no-std"]

[dependencies]
byteorder = { version = "1", default-features = false }
byteorder = { git = "https://github.com/mesalock-linux/byteorder-sgx" }

[dev-dependencies]
hex = "0.3"
byteorder = { version = "1", features = ["std"] }
#hex = "0.3"
#byteorder = { version = "1", features = ["std"] }

[badges]
travis-ci = { repository = "RustCrypto/utils" }
95 changes: 95 additions & 0 deletions blobby/Xargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
[dependencies]
alloc = {}

[dependencies.sgx_types]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 1

[dependencies.sgx_alloc]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 1

[dependencies.sgx_unwind]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 1

[dependencies.sgx_demangle]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 1

[dependencies.panic_abort]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 1

[dependencies.sgx_libc]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 2

[dependencies.sgx_tkey_exchange]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 2

[dependencies.sgx_tservice]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 2

[dependencies.sgx_tse]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 2

[dependencies.sgx_tcrypto]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 2

[dependencies.sgx_trts]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 3

[dependencies.sgx_backtrace_sys]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 3

[dependencies.panic_unwind]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 3

[dependencies.sgx_tdh]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 4

[dependencies.sgx_tseal]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 4

[dependencies.sgx_tprotected_fs]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 4

[dependencies.std]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
features = ["backtrace", "net"]
stage = 5

[dependencies.sgx_no_tstd]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 5

[dependencies.sgx_rand]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 6

[dependencies.sgx_serialize]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 6

[dependencies.sgx_tunittest]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 6

[dependencies.sgx_backtrace]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 7

[dependencies.sgx_cov]
git = "https://github.com/apache/teaclave-sgx-sdk.git"
stage = 7
6 changes: 3 additions & 3 deletions block-buffer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ keywords = ["block", "buffer"]
categories = ["cryptography", "no-std"]

[dependencies]
byteorder = { version = "1.1", default-features = false }
byte-tools = "0.3"
block-padding = "0.1"
byteorder = { git = "https://github.com/mesalock-linux/byteorder-sgx" }
byte-tools = { git = "https://github.com/mesalock-linux/rustcrypto-utils-sgx" }
block-padding = { git = "https://github.com/mesalock-linux/rustcrypto-utils-sgx" }
generic-array = "0.12"

[badges]
Expand Down
2 changes: 1 addition & 1 deletion block-buffer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use byteorder::{ByteOrder, BE};
use byte_tools::zero;
use block_padding::{Padding, PadError};
use generic_array::{GenericArray, ArrayLength};
use core::slice;
//use core::slice;

/// Buffer for block processing of data
#[derive(Clone, Default)]
Expand Down
2 changes: 1 addition & 1 deletion block-padding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ keywords = ["padding", "pkcs7", "ansix923", "iso7816"]
categories = ["cryptography", "no-std"]

[dependencies]
byte-tools = "0.3"
byte-tools = { git = "https://github.com/mesalock-linux/rustcrypto-utils-sgx" }

[badges]
travis-ci = { repository = "RustCrypto/utils" }
2 changes: 1 addition & 1 deletion hex-literal/hex-literal-impl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use proc_macro_hack::proc_macro_hack;

fn is_hex_char(c: &char) -> bool {
match *c {
'0'...'9' | 'a'...'f' | 'A'...'F' => true,
'0'..='9' | 'a'..='f' | 'A'..='F' => true,
_ => false,
}
}
Expand Down
2 changes: 1 addition & 1 deletion hex-literal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
//! assert_eq!(bytes, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]);
//! # }
//! ```
#![no_std]
#![doc(html_logo_url =
"https://raw.githubusercontent.com/RustCrypto/meta/master/logo_small.png")]

use proc_macro_hack::proc_macro_hack;
#[doc(hidden)]
#[proc_macro_hack]
Expand Down
31 changes: 31 additions & 0 deletions x86_64-unknown-linux-sgx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"arch": "x86_64",
"cpu": "x86-64",
"data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128",
"dynamic-linking": true,
"env": "sgx",
"exe-allocation-crate": "alloc_system",
"executables": true,
"has-elf-tls": true,
"has-rpath": true,
"linker-flavor": "gcc",
"linker-is-gnu": true,
"llvm-target": "x86_64-unknown-linux-gnu",
"max-atomic-width": 64,
"os": "linux",
"position-independent-executables": true,
"pre-link-args": {
"gcc": [
"-Wl,--as-needed",
"-Wl,-z,noexecstack",
"-m64"
]
},
"relro-level": "full",
"stack-probes": true,
"target-c-int-width": "32",
"target-endian": "little",
"target-family": "unix",
"target-pointer-width": "64",
"vendor": "mesalock"
}

0 comments on commit 2a0f122

Please sign in to comment.