Giter Club home page Giter Club logo

Comments (6)

anakrish avatar anakrish commented on July 27, 2024

Are you using oeedger8r on your Enclave.edl or are you using sgxedger8r

from openenclave.

sjrrr13 avatar sjrrr13 commented on July 27, 2024

Hello, I'm using sgxedger8r on my Enclave.edl.

from openenclave.

sjrrr13 avatar sjrrr13 commented on July 27, 2024

Use oeedger8r on Enclave.edl, the ECALL function needs an argument oe_enclave_t* (aka _oe_enclave*). But use sgxedger8r, the ECALL function needs an argument sgx_enclave_id_t (aka long unsigned int). If I want to call an Open Enclave ECALL in a SGXSDK project, what can I do to merge the difference between function arguments?

from openenclave.

anakrish avatar anakrish commented on July 27, 2024

You need to use oeedger8r for EDL files intended for use with openenclave. Since the enclave is written using OpenEnclave, on the host side, the EDL must be processed using oeedger8r.

from openenclave.

sjrrr13 avatar sjrrr13 commented on July 27, 2024

Thanks first! In fact, I have two EDL files, Enclave.edl (use sgx sdk) and helloworld.edl (use open enclave). I defined a ECALL enclave_helloworld() in helloworld.edl, and I use oeedger8r to process helloworld.edl. After that, I got a function

oe_result_t enclave_helloworld(oe_enclave_t* enclave);

Now I'm trying to call this function in the host side in my sgx sdk project. Specifically, in the host side in the sgx sdk project, named App.cpp, I import helloworld_u.h generated by oeedger8r and call enclave_helloworld.

// App.cpp in sgx sdk project
#include "helloworld_u.h"    // generated by oeedger8r

...
enclave_helloworld()    // what arg can I pass to this function?
...

However, sgx sdk does not support struct oe_enclave_t*. So I wonder is there any thing I can do to solve this problem?

from openenclave.

anakrish avatar anakrish commented on July 27, 2024

On the host-side you need to link with liboehost.a. The hellworld_u.h will have the declaration for a create_helloworld_enclave function. Calling that will create and enclave and get you a oe_enclave_t.
See

result = oe_create_helloworld_enclave(

from openenclave.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.