I compiled Openssl for android but I dont see how to access the functions from java. I think I need some kind of JNI files for that. Is there a way to generate the corresponding JNI files for the libssl.so and libcrypto.so from Openssl .c and .h files.
I compiled Openssl for android but I dont see how to access the functions
Share
Take a look at swig. That should be able to generate the necessary Java and c-code, to allow you to call the native functions defined in the openssl header from Java.
You should simply be able to do:
And you will have some java classes representing the openssl.h interface, and you will have a c-wrapper that you need to crosscompile for android (like you have done for openssl).
On another node, you might want to take a look at Bouncy Castle. This is the crypto system included in android (and accessible through javax.net.ssl – reading that link it sounds like openssl is included in android already).