On Feb 7, 2013, at 12:40 PM, Nikola <[email protected]> wrote: > thank you for you answer. I would be grateful if you could elaborate a bit, > because I am not sure how would using DllImport help me with this.
The first url [0] referenced an answer [1] which referenced using `libkeystore.so`, which has a C function you could P/Invoke [2]: Java_de_blinkt_openvpn_OpenVpnManagementThread_rsasign. Well, in theory you could P/Invoke. In practice, this would be difficult as we don't currently expose the JNIEnv* that you'd need in order to actually invoke that function, so this is problematic. But in theory, P/Invoke could do it. ;-) They also suggest using Java reflection to access private methods (the mentioned processSignJellyBeans() method, now at [3]), which could be translated to JNIEnv. The second url [4, 5] implies that it may not be possible at all, because the private key may be stored in hardware and inaccessible to your app. - Jon [0]: http://stackoverflow.com/questions/11261774/using-android-4-1-keychain [1]: http://stackoverflow.com/a/11387344/83444 [2]: http://code.google.com/p/ics-openvpn/source/browse/jni/jbcrypto.cpp#L20 [3]: http://code.google.com/p/ics-openvpn/source/browse/src/de/blinkt/openvpn/OpenVpnManagementThread.java#523 [4]: http://stackoverflow.com/questions/12507697/keychain-getprivatekeycontext-string-on-android-4-1 [5]: http://stackoverflow.com/a/12539380/83444 _______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
