Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Apr 21 02:41

    volcano0dr on master

    feat(sgx_types): add extra-trai… Merge pull request #325 from re… (compare)

  • Apr 20 02:01

    volcano0dr on master

    remove not-in-use fixed_size_ar… Merge pull request #337 from Ph… (compare)

  • Apr 15 06:40

    m4sterchain on sec-liboc

    Change sgx_libc interface. Fix… (compare)

  • Apr 02 14:39

    volcano0dr on master

    compiler: support rustc 2021-03… update x86_64-unknown-linux-sgx… Add sgx_tstd::prelude::{rust_20… and 1 more (compare)

  • Apr 01 05:23

    volcano0dr on newer-compiler-03-30

    Add sgx_tstd::prelude::{rust_20… (compare)

  • Mar 31 11:26

    volcano0dr on newer-compiler-03-30

    update x86_64-unknown-linux-sgx… (compare)

  • Mar 31 11:21

    volcano0dr on newer-compiler-03-30

    compiler: support rustc 2021-03… (compare)

  • Mar 31 10:41

    volcano0dr on newer-compiler-03-09

    (compare)

  • Mar 30 10:59

    volcano0dr on newer-compiler-03-09

    update x86_64-unknown-linux-sgx… (compare)

  • Mar 30 10:44

    volcano0dr on newer-compiler-03-09

    compiler: support rustc 2021-03… (compare)

  • Mar 30 10:43

    volcano0dr on newer-compiler-03-10

    (compare)

  • Mar 30 10:40

    volcano0dr on newer-compiler-03-10

    compiler: support rustc 2021-03… (compare)

  • Mar 24 06:38

    volcano0dr on v1.1.4-testing

    Sync upstream libunwind (compare)

  • Mar 24 02:32

    volcano0dr on v1.1.4-testing

    fix: add pointer null check on … fix: add 1 on unit test TCS fix: fix tlsclient and tlsserve… and 9 more (compare)

  • Mar 23 20:28

    dingelish on master

    Fix samplecode compiler error w… Merge pull request #329 from yu… (compare)

  • Mar 18 00:54

    dingelish on master

    Fix link to http_req-sgx Merge pull request #327 from Tr… (compare)

  • Mar 11 02:05

    volcano0dr on master

    Fix bug: set the initflag after… Merge pull request #324 from vo… (compare)

  • Mar 10 08:11

    dingelish on master

    fix: add pointer null check on … fix: add 1 on unit test TCS fix: fix tlsclient and tlsserve… and 2 more (compare)

  • Mar 08 07:18

    dingelish on v1.1.4-testing

    docker: fix centos8 (compare)

  • Mar 08 05:57

    dingelish on v1.1.4-testing

    docker: fix build script (compare)

cipepser
@cipepser
Seems great work! I'll try it later, thanks.
Sylvain Bellemare
@sbellem
:+1:
samuel199-creator
@samuel199-creator

Hey guys, this bug REALLY rubbed me. I have 2 self-built crates, networking and algo_impl, both are independently compiled OK with sgx-sdk v1.1.3;

However, while composing these two crated in lib's Cargo.toml and compile, the previously compiled crate networking crashed, but if I only include either one of these two crates and comment out another's related code, it compiled again... clearly, there some conflicts between these two crates, even tough they individually compiled...

Directory Structure.
├── enclave
│   ├── ...
│   ├── ...
│   ├── networking
│   ├── algo_impl
│   ├── ...
│   ├── ...
│   ├── Cargo.toml
│   └── src
enclave/networking/Cargo.toml, build ok itself.
[package]
name = "networking"
version = "0.1.0"
authors = ["Samuel Xing"]
edition = "2018"

[features]
default = []

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[target.'cfg(not(target_env = "sgx"))'.dependencies]
sgx_types       = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git" }
sgx_tstd        = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git", features = ["net", "thread", "backtrace"] }
sgx_tcrypto     = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git" }
sgx_tse         = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git" }
sgx_rand        = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git" }
channels        = { path = "../channels" }

[dependencies]
chrono          = { git = "https://github.com/mesalock-linux/chrono-sgx" }
webpki          = { git = "https://github.com/mesalock-linux/webpki", branch = "mesalock_sgx" }
webpki-roots    = { git = "https://github.com/mesalock-linux/webpki-roots", branch = "mesalock_sgx" }
base64          = { git = "https://github.com/mesalock-linux/rust-base64-sgx", tag = "sgx_1.1.3"}
yasna           = { git = "https://github.com/mesalock-linux/yasna.rs-sgx", features = ["bit-vec", "num-bigint", "chrono"], tag = "sgx_1.1.3" }
num-bigint      = { git = "https://github.com/mesalock-linux/num-bigint-sgx" }
bit-vec         = { version = "*", default-features = false}
httparse        = { version = "1.3.2", default-features=false }
itertools       = { version = "0.8" , default-features = false, features = []}
rustls          = { git = "https://github.com/mesalock-linux/rustls", tag = "sgx_1.1.3" }
anyhow          = { git = "https://github.com/mesalock-linux/anyhow-sgx", tag = "sgx_1.1.3"}
mio             = { git = "https://github.com/mesalock-linux/mio-sgx", branch = "v0.6_sgx_1.1.3"}
log             = { git = "https://github.com/mesalock-linux/log-sgx", tag = "sgx_1.1.3"  }

[patch.'https://github.com/apache/teaclave-sgx-sdk.git']
sgx_alloc = { path = "../../incubator-teaclave-sgx-sdk/sgx_alloc" }
sgx_backtrace_sys = { path = "../../incubator-teaclave-sgx-sdk/sgx_backtrace_sys" }
sgx_build_helper = { path = "../../incubator-teaclave-sgx-sdk/sgx_build_helper" }
sgx_demangle = { path = "../../incubator-teaclave-sgx-sdk/sgx_demangle" }
sgx_libc = { path = "../../incubator-teaclave-sgx-sdk/sgx_libc" }
sgx_rand = { path = "../../incubator-teaclave-sgx-sdk/sgx_rand" }
sgx_tcrypto = { path = "../../incubator-teaclave-sgx-sdk/sgx_tcrypto" }
sgx_tprotected_fs = { path = "../../incubator-teaclave-sgx-sdk/sgx_tprotected_fs" }
sgx_trts = { path = "../../incubator-teaclave-sgx-sdk/sgx_trts" }
sgx_tse = { path = "../../incubator-teaclave-sgx-sdk/sgx_tse" }
sgx_tstd = { path = "../../incubator-teaclave-sgx-sdk/sgx_tstd" }
sgx_types = { path = "../../incubator-teaclave-sgx-sdk/sgx_types" }
sgx_unwind = { path = "../../incubator-teaclave-sgx-sdk/sgx_unwind" }
enclave/algo_impl/Cargo.toml, build ok itself.
[package]
name = "algo_impl"
version = "0.1.0"
authors = ["Samuel Xing"]
edition = "2018"

[lib]
name = "algo_impl"

[features]
default = []

[target.'cfg(not(target_env = "sgx"))'.dependencies]
sgx_tstd            = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git", features = ["thread", "net", "backtrace"] }
sgx_rand            = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git" }
sgx_rand_derive     = { rev = "v1.1.3", git = "https://github.com/apache/teaclave-sgx-sdk.git" }
algo_deps2          = { path = "../algo_deps2" }
algo_deps1          = { path = "../algo_deps1" }
channels            = { path = "../channels" }

[dependencies]
serde               = { git = "https://github.com/mesalock-linux/serde-sgx", features = ["derive"] }
serde_derive        = { git = "https://github.com/mesalock-linux/serde-sgx"}
serde_json          = { git = "https://github.com/mesalock-linux/serde-json-sgx", tag = "sgx_1.1.3"  }
rustc-serialize     = { git = "https://github.com/mesalock-linux/rustc-serialize-sgx", tag = "sgx_1.1.3"  }
rand                = { version = "=0.6.3", default-features = false, features = []}
nalgebra            = { version = "=0.18.1", default-features = false, features = ["alloc"]}
prost               = { git = "https://github.com/mesalock-linux/prost-sgx", tag = "sgx_1.1.3"  }
bytes               = { git = "https://github.com/mesalock-linux/bytes-sgx", tag = "sgx_1.1.3"  }
prost-types         = { git = "https://github.com/mesalock-linux/prost-sgx", tag = "sgx_1.1.3"  }
http_req            = { git = "https://github.com/mesalock-linux/http_req-sgx", tag = "sgx_1.1.3"  }
anyhow              = { git = "https://github.com/mesalock-linux/anyhow-sgx", tag = "sgx_1.1.3"  }
mio                 = { git = "https://github.com/mesalock-linux/mio-sgx", branch = "v0.6_sgx_1.1.3"}

[build-dependencies]
prost-build = "0.6"

[patch.'https://github.com/apache/teaclave-sgx-sdk.git']
sgx_alloc = { path = "../../incubator-teaclave-sgx-sdk/sgx_alloc" }
sgx_backtrace_sys = { path = "../../incubator-teaclave-sgx-sdk/sgx_backtrace_sys" }
sgx_build_helper = { path = "../../incubator-teaclave-sgx-sdk/sgx_build_helper" }
sgx_demangle = { path = "../../incubator-teaclave-sgx-sdk/sgx_demangle" }
sgx_libc = { path = "../../incubator-teaclave-sgx-sdk/sgx_libc" }
sgx_rand = { path = "../../incubator-teaclave-sgx-sdk/sgx_rand" }
sgx_rand_derive = { path = "../../incubator-teaclave-sgx-sdk/sgx_rand_derive" }
sgx_tprotected_fs = { path = "../../incubator-teaclave-sgx-sdk/sgx_tprotected_fs" }
sgx_trts = { path = "../../incubator-teaclave-sgx-sdk/sgx_trts" }
sgx_tstd = { path = "../../incubator-teaclave-sgx-sdk/sgx_tstd" }
sgx_types = { path = "../../incubator-teaclave-sgx-sdk/sgx_types" }
sgx_unwind = { path = "../../incubator-teaclave-sgx-sdk/sgx_unwind" }
Yu Ding
@dingelish
@samuel199-creator could i have a git repo? i can debug it
samuel199-creator
@samuel199-creator
enclave/src/Cargo.toml, error logs
root@544cc41c1d88:~/sgx/server/enclave# cargo build
   Compiling networking v0.1.0 (/root/sgx/server/enclave/networking)
error: duplicate lang item in crate `std` (which `itertools` depends on): `f32_runtime`.
  |
  = note: the lang item is first defined in crate `sgx_tstd` (which `networking` depends on)
  = note: first definition in `sgx_tstd` loaded from /root/sgx/server/enclave/target/debug/deps/libsgx_tstd-e941f56af2fa83ad.rmeta
  = note: second definition in `std` loaded from /root/.rustup/toolchains/nightly-2020-10-25-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-3010daceac92f8fa.rlib

error: duplicate lang item in crate `std` (which `itertools` depends on): `f64_runtime`.
  |
  = note: the lang item is first defined in crate `sgx_tstd` (which `networking` depends on)
  = note: first definition in `sgx_tstd` loaded from /root/sgx/server/enclave/target/debug/deps/libsgx_tstd-e941f56af2fa83ad.rmeta
  = note: second definition in `std` loaded from /root/.rustup/toolchains/nightly-2020-10-25-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-3010daceac92f8fa.rlib

error: duplicate lang item in crate `std` (which `itertools` depends on): `panic_impl`.
  |
  = note: the lang item is first defined in crate `sgx_tstd` (which `networking` depends on)
  = note: first definition in `sgx_tstd` loaded from /root/sgx/server/enclave/target/debug/deps/libsgx_tstd-e941f56af2fa83ad.rmeta
  = note: second definition in `std` loaded from /root/.rustup/toolchains/nightly-2020-10-25-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-3010daceac92f8fa.rlib

error: duplicate lang item in crate `std` (which `itertools` depends on): `begin_panic`.
  |
  = note: the lang item is first defined in crate `sgx_tstd` (which `networking` depends on)
  = note: first definition in `sgx_tstd` loaded from /root/sgx/server/enclave/target/debug/deps/libsgx_tstd-e941f56af2fa83ad.rmeta
  = note: second definition in `std` loaded from /root/.rustup/toolchains/nightly-2020-10-25-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-3010daceac92f8fa.rlib

error: duplicate lang item in crate `std` (which `itertools` depends on): `oom`.
  |
  = note: the lang item is first defined in crate `sgx_tstd` (which `networking` depends on)
  = note: first definition in `sgx_tstd` loaded from /root/sgx/server/enclave/target/debug/deps/libsgx_tstd-e941f56af2fa83ad.rmeta
  = note: second definition in `std` loaded from /root/.rustup/toolchains/nightly-2020-10-25-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-3010daceac92f8fa.rlib

warning: unused import: `std::untrusted::time::SystemTimeEx`
 --> networking/src/util/cert.rs:4:5
  |
4 | use std::untrusted::time::SystemTimeEx;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error: aborting due to 5 previous errors; 1 warning emitted

error: could not compile `networking`

To learn more, run the command again with --verbose.
Yu Ding
@dingelish
@samuel199-creator could i have a git repo? i can debug it
samuel199-creator
@samuel199-creator
It's a private repo, company's code included, let me check if I can extract this bug out....I'll get back to you soon. @dingelish , thanks for your rapid reply!!!
Yu Ding
@dingelish
good luck! ping me whenever you're ready
samuel199-creator
@samuel199-creator
Hey yu @dingelish , you can check this out. https://github.com/samuel199-creator/hello-rust.
Yu Ding
@dingelish
@samuel199-creator this is a well know bug of old cargo package resolver
checkout my pr and you'll get the answer
root of the problem is prost depends on prost-derive and further involved anyhow as a build dep. the old cargo resolver will mess up everything if a package is used in both build dep and regular dep. new resolver fixed it.
samuel199-creator
@samuel199-creator
Awesome! I'll try it. BIG THANKS. @dingelish
Yu Ding
@dingelish
you're welcome! good luck!
Herman
@longtomjr
Hi, I have a question about the crypto-helper library. Is there a way to decompose a Rsa3072PubKey from it's parts, and re-create it from those parts?
The underlying issue here is that I want to pass a public key as an out parameter for an ECALL. So the untrusted code does a create_key() (where I create a keypair and safe it) ecall, and then that ecall should only "return" back the public key parts. This will allow the untrusted code to encrypt data that can only be decrypted inside of the enclave.
Herman
@longtomjr
Is there a better way to approach this? Note that this is for a stage in a PoC I am working on, end product wise the encryption would most likely happen in another enclave after attestation between the 2 enclaves. The above model is only to get to that point step by step.
Also note, that I have it currently working, but I am passing through the whole struct, and that struct is not FFI safe. (I assume that is a concern in this case since I have to declare a struct in the edl file for this to work)
Herman
@longtomjr
https://github.com/registreerocks/tee_median_poc it is still messy, but that is where I am currently at
Herman
@longtomjr
That should work yes, but unless I am missing something, it just uses the base crypto library (and types) in that function, and not any of the crypto-helper types/functions, like Rsa3072PubKey. Thanks for the link though, will just implement it like that example. As a side note, is there any exported types in the edl or .h files of the libraries that correspond to the sgx_crypto libraries' types?
Yu Ding
@dingelish
Hi @longtomjr , struct Rsa3072PubKey has derived Serialize and Deserialize. you can use serde to dump/create it
regarding to the second question, i believe you can find a minimal sample here: https://github.com/dingelish/magic-ucrypto
Herman
@longtomjr
@dingelish thanks a lot for all the help! I will have a look at the repo. I considered using serde like the one example, but I wanted to try and go the other way (using primitives or a struct) since the size of both arrays in the public key is well known, and that makes memory allocation easier (or at least easier to reason about) for the out variable (I think).
Yu Ding
@dingelish
gotcha. what is the ideal API to create a SgxRsa3072PubKey? could you please advise? i can add it very quickly
Herman
@longtomjr
Sorry for the late reply. Honestly the ideal is to have Rsa3072PubKey be FFI-Safe if possible. I am not super familiar with rust and FFI yet, so I don't know if it is possible. I think being able to get e and n from the Rsa3072PubKey, and creating a Rsa3072PubKey struct using e and n will also be easy to work with, since then you are just dealing with arrays that has a known length.
Also, honestly no rush on changing the API. We are at this point just prototyping the solution, hoping to start integrating it into our current stack over the coming couple of months. Probably moving things over bit-by-bit. So we don't know if we will need to use any changed API yet.
Any way to generate a keypair in the enclave, and then get the public key in untrusted code a bit easier, ideally using the structs from the crypto_helper libraries, would be good.
Sylvain Bellemare
@sbellem
@cipepser Are you still interested in adding SGX support to sodiumoxide? As far as I understood, as @dingelish pointed out, some preliminary work is required on libsodium. I drafted a small list of things that need to be addressed at initc3/libsodium#1. I will try to work on it in the upcoming days.
cipepser
@cipepser
@sbellem

Sorry for late reply, my notification was disbaled. Yes, I have wanted to use sodiumoxide in SGX.
I've tried to use initc3/sodiumoxide (striclty I forked it), however following errors happened in linking block me to take forward.

/usr/local/bin/ld: ../build/lib/liberc20enclave.a(libsodium_la-utils.o): in function `sodium_memzero':
/root/anonify/target/debug/build/libsodium-sys-818ae33fdaea26d7/out/source/libsodium/src/libsodium/sodium/utils.c:127: undefined reference to `explicit_bzero'
/usr/local/bin/ld: ../build/lib/liberc20enclave.a(libsodium_la-randombytes_sysrandom.o): in function `safe_read':
/root/anonify/target/debug/build/libsodium-sys-818ae33fdaea26d7/out/source/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c:135: undefined reference to `read'
/usr/local/bin/ld: ../build/lib/liberc20enclave.a(libsodium_la-randombytes_sysrandom.o): in function `randombytes_block_on_dev_random':
/root/anonify/target/debug/build/libsodium-sys-818ae33fdaea26d7/out/source/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c:158: undefined reference to `open'
/usr/local/bin/ld: /root/anonify/target/debug/build/libsodium-sys-818ae33fdaea26d7/out/source/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c:166: undefined reference to `poll'
/usr/local/bin/ld: /root/anonify/target/debug/build/libsodium-sys-818ae33fdaea26d7/out/source/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c:169: undefined reference to `close'
/usr/local/bin/ld: /root/anonify/target/debug/build/libsodium-sys-818ae33fdaea26d7/out/source/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c:173: undefined reference to `close'
/usr/local/bin/ld: ../build/lib/liberc20enclave.a(libsodium_la-randombytes_sysrandom.o): in function `randombytes_sysrandom_random_dev_open':
/root/anonify/target/debug/build/libsodium-sys-818ae33fdaea26d7/out/source/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c:197: undefined reference to `open'
/usr/local/bin/ld: /root/anonify/target/debug/build/libsodium-sys-818ae33fdaea26d7/out/source/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c:199: undefined reference to `fstat'
/usr/local/bin/ld: /root/anonify/target/debug/build/libsodium-sys-818ae33fdaea26d7/out/source/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c:209: undefined reference to `fcntl'
/usr/local/bin/ld: /root/anonify/target/debug/build/libsodium-sys-818ae33fdaea26d7/out/source/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c:209: undefined reference to `fcntl'
/usr/local/bin/ld: /root/anonify/target/debug/build/libsodium-sys-818ae33fdaea26d7/out/source/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c:213: undefined reference to `close'
/usr/local/bin/ld: ../build/lib/liberc20enclave.a(libsodium_la-randombytes_sysrandom.o): in function `_randombytes_linux_getrandom':
/root/anonify/target/debug/build/libsodium-sys-818ae33fdaea26d7/out/source/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c:233: undefined reference to `getrandom'
/usr/local/bin/ld: ../build/lib/liberc20enclave.a(libsodium_la-randombytes_sysrandom.o): in function `randombytes_sysrandom_close':
/root/anonify/target/debug/build/libsodium-sys-818ae33fdaea26d7/out/source/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c:318: undefined reference to `close'
collect2: error: ld returned 1 exit status

It seems to use functions defined in libc, does libsodium depend on libc? If I could, I would fix it. Please give me some advice?

Sylvain Bellemare
@sbellem
Hey @cipepser, I am sorry for the delay. I don't know ... I'll try to have a look as soon as possible.
cipepser
@cipepser
Hi @sbellem , I could not solve above errors, so now I try to use crypto_box library in RustCrypt. So no rush to use sodiumoxide, thank you for your reply.
https://github.com/RustCrypto/AEADs/tree/master/crypto_box
Sylvain Bellemare
@sbellem
Ah ok! Thanks for the information @cipepser !
Astewart1510
@Astewart1510
Hi there, I am wanting to know if its possible to use rocket as a communication layer for the enclave. To serve a port and handle requests that then issue the enclave functions? I am very new to this so excuse my lack of jargon. Thanks in advance.
datchva
@datchva

yeah, caused by recent syn update, I will try to fix it tomorrow. Meanwhile as temporary fix you can add lower version in your cargo.toml

[dev-dependencies]
syn="=1.0.56"

Blaine Malone
@blmalone

Okay noob question, I've got SGX setup but want to use the Rust-SGX-SDK.
I'm following the README and came across the docker run -v /your/path/to/rust-sgx:/root/sgx -ti --device /dev/isgx baiduxlab/sgx-rust command.

I'm a little confused as to what /your/path/to/rust-sgx is? Does it refer to this project, https://github.com/fortanix/rust-sgx?

Blaine Malone
@blmalone
Never mind, it's just a matter of pointing to git clone https://github.com/apache/incubator-teaclave-sgx-sdk.git. The wording caught me a little here.
Blaine Malone
@blmalone

Trying to get a Simulation example working on macOS

https://github.com/apache/incubator-teaclave-sgx-sdk#use-simulation-mode-for-non-sgx-enabled-machine-includes-macos

Getting the following error when I use the stable build:

./lib/libenclave.a(sgx_trts-e1de7fe3db2688ea.sgx_trts.c1x8g4sc-cgu.2.rcgu.o): In function `sgx_trts::enclave::SgxGlobalData::new::hd171d7330c2c7ee0':
sgx_trts.c1x8g4sc-cgu.2:(.text._ZN8sgx_trts7enclave13SgxGlobalData3new17hd171d7330c2c7ee0E+0xa5): undefined reference to `get_rsrv_base'
sgx_trts.c1x8g4sc-cgu.2:(.text._ZN8sgx_trts7enclave13SgxGlobalData3new17hd171d7330c2c7ee0E+0xb2): undefined reference to `get_rsrv_size'
collect2: error: ld returned 1 exit status
Makefile:155: recipe for target 'enclave/enclave.so' failed
make: *** [enclave/enclave.so] Error 1
Blaine Malone
@blmalone
1. docker pull baiduxlab/sgx-rust-stable
2. docker run -v /Users/<user.name>/code/incubator-teaclave-sgx-sdk:/root/sgx -ti baiduxlab/sgx-rust-stable
3. cd sgx/samplecode/helloworld/
4. Edit Makefile for SW mode
5. make && cd bin
6. ./app
I get the above error after performing these steps on macOS.
Blaine Malone
@blmalone
Raised an issue as I can't see any existing issues for it, apache/incubator-teaclave-sgx-sdk#318
Blaine Malone
@blmalone

Not sure how active this conversation thread is but I'll try again....

6_64-unknown-linux-gnu/lib/libcompiler_builtins-f51baad7bbcb81c4.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc"
  = note: /usr/bin/ld: /root/sgx/samplecode/hello-rust/app/target/release/deps/libsgx_tcrypto-1902d87c87f3e072.rlib(sgx_tcrypto-1902d87c87f3e072.sgx_tcrypto.3jhltoaz-cgu.1.rcgu.o): in function `<sgx_tcrypto::crypto::SgxRsaPrivKey as core::ops::drop::Drop>::drop':
          sgx_tcrypto.3jhltoaz-cgu.1:(.text._ZN76_$LT$sgx_tcrypto..crypto..SgxRsaPrivKey$u20$as$u20$core..ops..drop..Drop$GT$4drop17h7d56483f335f559cE+0x35): undefined reference to `sgx_free_rsa_key'
          collect2: error: ld returned 1 exit status

I'm trying to use sgx_tcrypto in the app (not the enclave) and I receive this error. Any ideas?

Herman
@longtomjr
Hi. Quick question. Is there a reason the types in the sgx_types/src/types.rs does not implement fmt::Debug using derive?
Thinking about forking the crate and adding the derives to allow me to create strategies with proptest on those types.
Herman
@longtomjr
@blmalone why are you using tcrypto in the app? any reason ucripto will not cut it?
Blaine Malone
@blmalone
@longtomjr you're right I started using ucrypto and it worked.
Herman
@longtomjr
Awesome, glad you got it working