android: Build libpts and init/deinit libpts in BYOD IMC
This commit is contained in:
@@ -77,7 +77,8 @@ ifneq ($(strongswan_USE_BYOD),)
|
||||
strongswan_BUILD += \
|
||||
strongswan/src/libtnccs \
|
||||
strongswan/src/libtncif \
|
||||
strongswan/src/libimcv
|
||||
strongswan/src/libimcv \
|
||||
strongswan/src/libpts
|
||||
endif
|
||||
|
||||
include $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, \
|
||||
|
||||
@@ -34,6 +34,7 @@ LOCAL_C_INCLUDES += \
|
||||
$(strongswan_PATH)/src/libimcv \
|
||||
$(strongswan_PATH)/src/libtncif \
|
||||
$(strongswan_PATH)/src/libtnccs \
|
||||
$(strongswan_PATH)/src/libpts \
|
||||
$(strongswan_PATH)/src/libtls
|
||||
endif
|
||||
|
||||
@@ -53,7 +54,7 @@ LOCAL_LDLIBS := -llog
|
||||
LOCAL_SHARED_LIBRARIES := libstrongswan libhydra libipsec libcharon
|
||||
|
||||
ifneq ($(strongswan_USE_BYOD),)
|
||||
LOCAL_SHARED_LIBRARIES += libimcv libtncif libtnccs
|
||||
LOCAL_SHARED_LIBRARIES += libimcv libtncif libtnccs libpts
|
||||
endif
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "imc_android_state.h"
|
||||
|
||||
#include <tnc/tnc.h>
|
||||
#include <libpts.h>
|
||||
#include <imc/imc_agent.h>
|
||||
#include <imc/imc_msg.h>
|
||||
#include <pa_tnc/pa_tnc_msg.h>
|
||||
@@ -64,6 +65,8 @@ TNC_Result TNC_IMC_Initialize(TNC_IMCID imc_id,
|
||||
return TNC_RESULT_FATAL;
|
||||
}
|
||||
|
||||
libpts_init();
|
||||
|
||||
if (min_version > TNC_IFIMC_VERSION_1 || max_version < TNC_IFIMC_VERSION_1)
|
||||
{
|
||||
DBG1(DBG_IMC, "no common IF-IMC version");
|
||||
@@ -352,6 +355,8 @@ TNC_Result TNC_IMC_Terminate(TNC_IMCID imc_id)
|
||||
DBG1(DBG_IMC, "IMC \"%s\" has not been initialized", imc_name);
|
||||
return TNC_RESULT_NOT_INITIALIZED;
|
||||
}
|
||||
/* has to be done before destroying the agent / deinitializing libimcv */
|
||||
libpts_deinit();
|
||||
imc_android->destroy(imc_android);
|
||||
imc_android = NULL;
|
||||
return TNC_RESULT_SUCCESS;
|
||||
|
||||
@@ -606,6 +606,7 @@ public class CharonVpnService extends VpnService implements Runnable
|
||||
System.loadLibrary("tncif");
|
||||
System.loadLibrary("tnccs");
|
||||
System.loadLibrary("imcv");
|
||||
System.loadLibrary("pts");
|
||||
}
|
||||
|
||||
System.loadLibrary("hydra");
|
||||
|
||||
Reference in New Issue
Block a user