Dear All,

How can one call an external engine dynamically in Android?
Does the Android allow for dynamic loading of engines?

I recompiled OpenSSL1.0.0c with Engine support and added it to my App as a
shared library.  I also compiled the engine source codes and got the shared
library of the engine in the "lib" directory of my App.Then in my Native
JNI Code I tried to load my engine using:

ENGINE_load_dynamic();
ENGINE * dyn = ENGINE_by_id( "dynamic" );


char * engine_path = "/data/data/com.example.engine/lib/libmyengine.so";

if ( 1 != ENGINE_ctrl_cmd_string( dyn, "SO_PATH", engine_path,
CMD_MANDATORY ) )
   //print error path

if ( 1 != ENGINE_ctrl_cmd_string( dyn, "ID", "myengine", CMD_MANDATORY ) )
   //print error id

if ( 1 != ENGINE_ctrl_cmd( dyn, "LIST_ADD", 1, NULL, NULL, CMD_MANDATORY ) )
      //print error list_add

if ( 1 != ENGINE_ctrl_cmd( dyn, "LOAD", 1, NULL, NULL, CMD_MANDATORY ) )
       //print error load


In the above code, the LOAD seems to fail. In the Java code, I did make a
call to:

  static{
        System.loadLibrary("myengine");
    }

Please advise. Could anyone explain how I can load my engine?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Security Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-security-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to android-security-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/android-security-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to