android: Make sure libtpmtss is loaded on older systems
authorTobias Brunner <tobias@strongswan.org>
Fri, 9 Dec 2016 10:16:42 +0000 (11:16 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 9 Dec 2016 10:16:42 +0000 (11:16 +0100)
On newer Android systems this seems to happen automatically (or does at
least not cause crashes if the library is not loaded).

src/frontends/android/app/src/main/java/org/strongswan/android/logic/CharonVpnService.java
src/frontends/android/app/src/main/jni/libandroidbridge/Android.mk
src/frontends/android/app/src/main/jni/libandroidbridge/android_jni.c

index 0048a2d..9e9b673 100644 (file)
@@ -943,6 +943,7 @@ public class CharonVpnService extends VpnService implements Runnable, VpnStateSe
 
                        if (MainActivity.USE_BYOD)
                        {
+                               System.loadLibrary("tpmtss");
                                System.loadLibrary("tncif");
                                System.loadLibrary("tnccs");
                                System.loadLibrary("imcv");
index 8c4224e..c37210d 100644 (file)
@@ -57,7 +57,7 @@ LOCAL_LDLIBS := -llog
 LOCAL_SHARED_LIBRARIES := libstrongswan libipsec libcharon
 
 ifneq ($(strongswan_USE_BYOD),)
-LOCAL_SHARED_LIBRARIES += libimcv libtncif libtnccs
+LOCAL_SHARED_LIBRARIES += libimcv libtncif libtnccs libtpmtss
 endif
 
 include $(BUILD_SHARED_LIBRARY)
index eaba85d..fb973a8 100644 (file)
@@ -33,6 +33,7 @@ static struct {
 } libs[] = {
        { "libstrongswan.so", NULL },
 #ifdef USE_BYOD
+       { "libtpmtss.so", NULL },
        { "libtncif.so", NULL },
        { "libtnccs.so", NULL },
        { "libimcv.so", NULL },