From 366f612047a15e32ee89b482730a4ab4f9eb45cf Mon Sep 17 00:00:00 2001 From: Feng Jie Date: Thu, 2 Aug 2018 14:19:08 +0800 Subject: [PATCH] Fix SKF and SDF engines build error When build dynamic library on Windows, build errors occur on SKF and SDF engines build. Because when the engines are compiled into a self-contained dll, bind_engine and v_check are needed which has been exported in def file. Add missing methods here to resolve the build error. Because the engines are dummy implemented, the methods added here are also dummy. --- engines/sdf_dummy.c | 12 ++++++++++-- engines/skf_dummy.c | 8 ++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/engines/sdf_dummy.c b/engines/sdf_dummy.c index 82eb8e8b..954a413f 100644 --- a/engines/sdf_dummy.c +++ b/engines/sdf_dummy.c @@ -52,6 +52,7 @@ #include #include #include +#include static char *deviceHandle = "SDF Device Handle"; static char *sessionHandle = "SDF Session Handle"; @@ -471,7 +472,7 @@ int SDF_GenerateAgreementDataWithECC( ECCrefPublicKey *pucSponsorTmpPublicKey, void **phAgreementHandle) { - // any output public key ? + // any output public key ? if (!phAgreementHandle || !(*phAgreementHandle)) return SDR_INARGERR; *phAgreementHandle = agreementHandle; @@ -509,7 +510,7 @@ int SDF_GenerateAgreementDataAndKeyWithECC( ECCrefPublicKey *pucResponseTmpPublicKey, void **phKeyHandle) { - // any output + // any output if (!phKeyHandle || !(*phKeyHandle)) return SDR_INARGERR; *phKeyHandle = keyHandle; @@ -766,3 +767,10 @@ int SDF_DeleteFile( { return SDR_OK; } + +static int bind(ENGINE *e, const char *id) +{ + return 1; +} +IMPLEMENT_DYNAMIC_BIND_FN(bind) +IMPLEMENT_DYNAMIC_CHECK_FN() diff --git a/engines/skf_dummy.c b/engines/skf_dummy.c index 5b383369..ef6c600e 100644 --- a/engines/skf_dummy.c +++ b/engines/skf_dummy.c @@ -53,6 +53,7 @@ #include #include #include +#include static char *hDeviceHandle = "hDeviceHandle"; static char *hApplication = "hApplication"; @@ -962,3 +963,10 @@ ULONG DEVAPI SKF_CloseHandle( { return SAR_OK; } + +static int bind(ENGINE *e, const char *id) +{ + return 1; +} +IMPLEMENT_DYNAMIC_BIND_FN(bind) +IMPLEMENT_DYNAMIC_CHECK_FN()