I was able to resolve the "-Wformat-security" issue by adding the line "PRIVATE -Wno-error=format-security" to the file "ext/mbedtls.cmake".
I also added the configurations as mentioned by you. Now the updated configurations for pkcs11 is as mentioned below.
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${exec_prefix} \
-DPTMW_Host=iMXLinux \
-DIOT=None -DPTMW_Applet=SE05X_C -DPTMW_SE05X_Ver=06_00 \
-DOPENSSL_INSTALL_PREFIX=${RECIPE_SYSROOT}${exec_prefix} \
-DOPENSSL_ROOT_DIR=${RECIPE_SYSROOT}${exec_prefix} \
-DSSS_HAVE_LOG_SILENT=1 \
-DPTMW_HostCrypto=MBEDTLS \
-DPTMW_mbedTLS_ALT=SSS \
-DPTMW_RTOS=Default \
-DWithSharedLIB=ON \
-DPTMW_SMCOM=T1oI2C \
-DPTMW_SE05X_Auth=None \
-DPTMW_SCP=None \
-DPAHO_BUILD_DEB_PACKAGE=OFF \
-DPAHO_BUILD_DOCUMENTATION=OFF \
-DPAHO_BUILD_SAMPLES=OFF \
-DPAHO_BUILD_SHARED=OFF \
-DPAHO_BUILD_STATIC=OFF \
-DPAHO_ENABLE_CPACK=ON \
-DPAHO_ENABLE_TESTING=OFF \
-DPAHO_WITH_SSL=ON \
-DSSSFTR_SE05X_AES=ON \
-DSSSFTR_SE05X_AuthECKey=ON \
-DSSSFTR_SE05X_AuthSession=ON \
-DSSSFTR_SE05X_CREATE_DELETE_CRYPTOOBJ=ON \
-DSSSFTR_SE05X_ECC=ON \
-DSSSFTR_SE05X_KEY_GET=ON \
-DSSSFTR_SE05X_KEY_SET=ON \
-DSSSFTR_SE05X_RSA=ON \
-DSSSFTR_SW_AES=ON \
-DSSSFTR_SW_ECC=ON \
-DSSSFTR_SW_KEY_GET=ON \
-DSSSFTR_SW_KEY_SET=ON \
-DSSSFTR_SW_RSA=ON \
-DSSSFTR_SW_TESTCOUNTERPART=ON \
-DWithAccessMgr_UnixSocket=OFF \
-DWithCodeCoverage=OFF \
-DWithExtCustomerTPMCode=OFF \
-DWithNXPNFCRdLib=OFF \
-DWithOPCUA_open62541=OFF \
Now we are getting undefined reference errors for function definitions. I have pasted a small snippet of the error log below.
| FAILED: bin/mbedtls_ex_orig_ssl_server2
| : && ~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=hard -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0=/usr/src/debug/se05x-pkcs11/04.02.00-r0 -fdebug-prefix-map=~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0=/usr/src/debug/se05x-pkcs11/04.02.00-r0 -fdebug-prefix-map=~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0/recipe-sysroot= -fdebug-prefix-map=~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0/recipe-sysroot-native= -march=armv7-a -mfpu=neon -mfloat-abi=hard -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0/recipe-sysroot -Wno-unused-result -fPIC -fPIC -DNDEBUG -march=armv7-a -mfpu=neon -mfloat-abi=hard -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now sss/ex/mbedtls/CMakeFiles/mbedtls_ex_orig_ssl_server2.dir/__/__/__/ext/mbedtls/programs/ssl/ssl_server2.c.o sss/ex/mbedtls/CMakeFiles/mbedtls_ex_orig_ssl_server2.dir/__/__/__/ext/mbedtls/programs/test/query_config.c.o sss/ex/mbedtls/CMakeFiles/mbedtls_ex_orig_ssl_server2.dir/__/__/__/ext/mbedtls/tests/src/helpers.c.o sss/ex/mbedtls/CMakeFiles/mbedtls_ex_orig_ssl_server2.dir/__/__/__/ext/mbedtls/programs/ssl/ssl_test_lib.c.o -o bin/mbedtls_ex_orig_ssl_server2 -Wl,-rpath,"\$ORIGIN/../sss:\$ORIGIN/../hostlib/hostLib/se05x:\$ORIGIN/../hostlib/hostLib:\$ORIGIN/../hostlib/hostLib/libCommon:\$ORIGIN/../ext:\$ORIGIN/../hostlib/hostLib/libCommon/log" sss/libSSS_APIs.so hostlib/hostLib/se05x/libse05x.so hostlib/hostLib/liba7x_utils.so hostlib/hostLib/libCommon/libsmCom.so ext/libmbedtls.so hostlib/hostLib/libCommon/log/libmwlog.so ~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0/recipe-sysroot/usr/lib/libssl.so ~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0/recipe-sysroot/usr/lib/libcrypto.so -lpthread && cd ~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0/se05x-pkcs11-04.02.00/sss/ex/mbedtls && ~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0/recipe-sysroot-native/usr/bin/cmake -E copy ~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0/se05x-pkcs11-04.02.00/bin/mbedtls_ex_orig_ssl_server2 ~/work/build/workspace/sources/se05x-pkcs11/tools
| ~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: ext/libmbedtls.so: undefined reference to `gecc_der_header_224k'
| ~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: ext/libmbedtls.so: undefined reference to `gecc_der_header_nist192'
| ~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: ext/libmbedtls.so: undefined reference to `gecc_der_header_bp384'
| ~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: ext/libmbedtls.so: undefined reference to `der_ecc_224k_header_len'
| ~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: ext/libmbedtls.so: undefined reference to `der_ecc_bp256_header_len'
| ~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: ext/libmbedtls.so: undefined reference to `sss_asymmetric_verify_digest'
| ~/work/build/tmp/work/armv7ahf-neon-poky-linux-gnueabi/se05x-pkcs11/04.02.00-r0/recipe-sysroot-native/usr/bin/arm-poky-linux-gnueabi/../../libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: ext/libmbedtls.so: undefined reference to `sss_key_store_set_key'
I request you to help us resolve this issue ASAP.
Thanks and regards,
Ajit