EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Custom httpsclient with SecureBlackBox on Android

Posted: 11/03/2014 05:18:49
by Lemon Yang (Standard support level)
Joined: 11/24/2009
Posts: 48

As my experience, it's different between linux and android for loading 3rd party so library with dlopen since it only allow to load system so file, and we can't put the pkcs11 so file into the system library folder without root the OS.

can you do a quick testing for that? thank you.
Posted: 11/03/2014 05:27:06
by Vsevolod Ievgiienko (Team)

Our .so library is loaded using Java and System.load method. Then it loads third-party PKCS#11 driver using dlopen call. As far as I know you can pack all needed libraries to the APK.
Posted: 11/03/2014 07:59:08
by Lemon Yang (Standard support level)
Joined: 11/24/2009
Posts: 48

ok, looks like I can only try it
Posted: 11/03/2014 08:18:39
by Eugene Mayevski (Team)

1) We don't have Android-compatible PKCS#11 devices and so far our search for some samples was not successful. So we can't test this for you.
2) you have the device and you have the trial version. You don't need to "trust", you indeed need to test your particular device. We can't do this for you cause the device is yours. A hint - one of our customers sent us their custom device for testing.

Sincerely yours
Eugene Mayevski
Posted: 11/09/2014 21:48:35
by Lemon Yang (Standard support level)
Joined: 11/24/2009
Posts: 48

we created a sample on the android to test the httpsclient, and error occured as below at "JNI.initialize();". we've put the libsbbjni.so file into the /lib/armebi folder and package it. same code works on the windows sytem.

the error message is: "dlopen("libsbbjni") failed: dlopen failed: library "libsbbjni" not found".

you can download the source code from http://1drv.ms/1spzdrF

it's urgent for us, thank you very much.
Posted: 11/10/2014 02:42:25
by Vsevolod Ievgiienko (Team)

Please try to load the library next way:

Posted: 11/26/2014 04:44:03
by Lemon Yang (Standard support level)
Joined: 11/24/2009
Posts: 48

hi, I tried JNI.initialize("libsbbjni.so") function, now it works on my Sumsung mobile phone,which is Android 4.3.

but when I test it on Android 4.2.2 mobile phone, the error is reported as below:

11-26 17:17:48.679: D/dalvikvm(16966): Trying to load lib libsbbjni.so 0x41b82108
11-26 17:17:48.679: E/linker(16966): load_library(linker.cpp:761): library "libsbbjni.so" not found
11-26 17:17:48.680: E/dalvikvm(16966): dlopen("libsbbjni.so") failed: Cannot load library: load_library(linker.cpp:761): library "libsbbjni.so" not found

can you help me on it?
Posted: 11/26/2014 04:49:01
by Eugene Mayevski (Team)

It's not clear how we can help with the particular device on your side.

The issue is not specific to SecureBlackbox and you can have more luck asking eg. on StackOverflow, why the shared object (.so library) is not found on your device.

Also try running this code on various emulators and see if the code works on them. If it doesn't work on some emulators, we'll try to reproduce the issue on our emulator (but still asking on StackOverflow is a good idea).

Sincerely yours
Eugene Mayevski
Posted: 12/22/2014 10:42:18
by Libero Rignanese (Basic support level)
Joined: 12/22/2014
Posts: 1

I've the same problem.
The problem is that in some device you can't use that .so name
Just rename
This worked for me in this way

public class Test {
   public static void test(){

So you need to edit in JNI.java the static loading method.
I hope this help.
Posted: 12/23/2014 03:37:12
by Vsevolod Ievgiienko (Team)

It seems that the problem is device dependent. Currently the solution is to recompile JNI.java file that is included into source code package. We'll think how to extend this class to support all possible cases.



Topic viewed 1918 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!