Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Integration - 3 party dynamic TA #12

Open
vamanea opened this issue Oct 13, 2015 · 0 comments
Open

Android Integration - 3 party dynamic TA #12

vamanea opened this issue Oct 13, 2015 · 0 comments

Comments

@vamanea
Copy link

vamanea commented Oct 13, 2015

Hi Guys,

I our Android integration I found that having one OpenTEE instance for every application was not very convenient. One instance in the system is much more convenient. However the problem here is that to provide a proper SDK for 3rd party developers there is a need to allow the developer to dynamically load the TA he just built.
With this in mind I developed some patches that allow the developer to only embed the TA inside the APK and be able to load it through TEEC_OpenSession. The code looks something like this:

    session.ta_path = alloca(strlen(filename) + 1);
    memset(session.ta_path, 0, strlen(filename) + 1);
    strncpy(session.ta_path, filename, strlen(filename));

    TEE_Debug("Opening session to TA %s", session.ta_path);
    result = TEEC_OpenSession(&context, &session, &EXAMPLE_uuid,
        TEEC_LOGIN_PUBLIC, NULL, NULL, NULL);

    if(result != TEEC_SUCCESS) {
        TEE_Error("teec open session failed\n");
        goto cleanup;
    }

Where filename is a path from the JAVA side. This allowed us to have much simpler OpenTEE Android SDK and integration.

Now I was wondering if you are interested in pursuing this further to integrate said patches.

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant