incubator-teaclave-sgx-sdk icon indicating copy to clipboard operation
incubator-teaclave-sgx-sdk copied to clipboard

Update getrandom-sgx to v2.3

Open haerdib opened this issue 4 years ago • 2 comments

We're currently trying to update our substrate dependencies to v4.0.0-dev (see issue https://github.com/integritee-network/worker/issues/346). But substrate now depends on hashbrown 0.11.0 which itself depends on getrandom 2.3 (same as in issue #326). We're currently in the development phase, so having our own getrandom fork and keeping it up to date all the time is not yet necessary from a security perspective. A simple patch to your getrandom-sgx crate would be enough.

Would it be possible to update getrandom-sgx to v2.3 so we can apply the patch?

Thanks alot for your help so far!

haerdib avatar Aug 10 '21 14:08 haerdib

I have forked & rebased on newest getrandom master commit: https://github.com/integritee-network/getrandom-sgx/pull/1 and I'd love to create a PR to getrandom-sgx. But I can't build it yet (& tests aren't passing) due the sampleenclave encountering the following errors:

error[E0557]: feature has been removed
  --> /home/bhaerdi/.cargo/git/checkouts/teaclave-sgx-sdk-be25c2ad2f03718d/7c07ce0/sgx_unwind/lib.rs:24:12
   |
24 | #![feature(unwind_attributes)]
   |            ^^^^^^^^^^^^^^^^^ feature has been removed
   |
   = note: use the C-unwind ABI instead

error: cannot find attribute `unwind` in this scope
  --> /home/bhaerdi/.cargo/git/checkouts/teaclave-sgx-sdk-be25c2ad2f03718d/7c07ce0/sgx_unwind/libunwind.rs:65:7
   |
65 |     #[unwind(allowed)]
   |       ^^^^^^

Do you know what I'm missing here?

haerdib avatar Aug 13 '21 09:08 haerdib

This is a rust-toolchain incompatibility, i.e., this feature was most-likely stabilized meanwhile. Therefore, the feature does not need to be activated explicitly.

You should run everything with the same toolchain as advised in teaclave.

clangenb avatar Sep 07 '21 08:09 clangenb