I have followed FIPS Library and Android from the OpenSSL wiki to build the FIPS Object Module. After creating libcrypto.a
for both ARM and x86 architecture, I included libcrypto.a
in my project's jni/include folder, and then performed an NDK build.
I am getting the below error everytime. Not able to resolve the issue. Can anyone tell me where I am going wrong.
5.45/OpenSSL/jni/include/armeabi/libcrypto.a(fipscanister.o):fips_canister.c:function fips_openssl_cpuid_setup: error: undefined reference to 'sigfillset'
5.45/OpenSSL/jni/include/armeabi/libcrypto.a(fipscanister.o):fips_canister.c:function fips_openssl_cpuid_setup: error: undefined reference to 'sigdelset'
5.45/OpenSSL/jni/include/armeabi/libcrypto.a(fipscanister.o):fips_canister.c:function fips_openssl_cpuid_setup: error: undefined reference to 'sigdelset'
5.45/OpenSSL/jni/include/armeabi/libcrypto.a(fipscanister.o):fips_canister.c:function fips_openssl_cpuid_setup: error: undefined reference to 'sigdelset'
5.45/OpenSSL/jni/include/armeabi/libcrypto.a(fipscanister.o):fips_canister.c:function fips_openssl_cpuid_setup: error: undefined reference to 'sigdelset'
5.45/OpenSSL/jni/include/armeabi/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'signal'
5.45/OpenSSL/jni/include/armeabi/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'
5.45/OpenSSL/jni/include/armeabi/libcrypto.a(ui_openssl.o):ui_openssl.c:function read_string_inner: error: undefined reference to 'tcsetattr'
5.45/OpenSSL/jni/include/armeabi/libcrypto.a(ui_openssl.o):ui_openssl.c:function open_console: error: undefined reference to 'tcgetattr'
collect2: error: ld returned 1 exit status
make: *** [5.45/OpenSSL/obj/local/armeabi/libmaascrypto.so] Error 1
Here is the Android.mk inside my NDK_application/jni folder
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := crypto
LOCAL_SRC_FILES := include/$(TARGET_ARCH_ABI)/libcrypto.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := XYZcrypto
LOCAL_SRC_FILES := XYZcbcEncryption.cpp XYZEcbEncryption.cpp XYZSHA256.c
LOCAL_SHARED_LIBRARIES := crypto
include $(BUILD_SHARED_LIBRARY)