From c6d38fb0fed60a8203afce7e90fdb9434d1d728e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A6=BB=E6=A0=87=E9=87=8F?= <875922464@qq.com>
Date: Thu, 28 Nov 2024 17:56:09 +0800
Subject: [PATCH 01/10] provider_revise

---
 crypto/provider/src/mgr/crypt_provider.c                       | 2 +-
 testcode/sdv/testcase/bsl/sal/test_suite_sdv_sal_dl.data       | 2 +-
 testcode/testdata/provider/provider_load_test1.c               | 2 +-
 testcode/testdata/provider/provider_load_test2.c               | 2 +-
 testcode/testdata/provider/provider_load_test_no_fullfunc.c    | 2 +-
 testcode/testdata/provider/provider_load_test_providerNoFree.c | 2 +-
 testcode/testdata/provider/provider_load_test_providerNoInit.c | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/crypto/provider/src/mgr/crypt_provider.c b/crypto/provider/src/mgr/crypt_provider.c
index 29f7983..a1184dd 100644
--- a/crypto/provider/src/mgr/crypt_provider.c
+++ b/crypto/provider/src/mgr/crypt_provider.c
@@ -29,7 +29,7 @@
 #include "crypt_provider.h"
 
 // Name of the dl initialization function
-#define PROVIDER_INIT_FUNC "CRYPT_EAL_ProviderInitcb"
+#define PROVIDER_INIT_FUNC "CRYPT_EAL_ProviderInit"
 
 // Maximum length of search path
 #define DEFAULT_PROVIDER_PATH_LEN_MAX 4095
diff --git a/testcode/sdv/testcase/bsl/sal/test_suite_sdv_sal_dl.data b/testcode/sdv/testcase/bsl/sal/test_suite_sdv_sal_dl.data
index ac72427..a89ed9e 100644
--- a/testcode/sdv/testcase/bsl/sal/test_suite_sdv_sal_dl.data
+++ b/testcode/sdv/testcase/bsl/sal/test_suite_sdv_sal_dl.data
@@ -1,5 +1,5 @@
 SDV_BSL_SAL_DL_FUNC_TC001
-SDV_BSL_SAL_DL_FUNC_TC001:"../testdata/provider/path1/libprovider_load_test1.so":"../testdata/provider/path1/libprovider_load_test2.so":"../testdata/provider/path1/libprovider_load_test_no_init.so":"CRYPT_EAL_ProviderInitcb"
+SDV_BSL_SAL_DL_FUNC_TC001:"../testdata/provider/path1/libprovider_load_test1.so":"../testdata/provider/path1/libprovider_load_test2.so":"../testdata/provider/path1/libprovider_load_test_no_init.so":"CRYPT_EAL_ProviderInit"
 
 SDV_BSL_SAL_CONVERTER_NAME_TC001  #1
 SDV_BSL_SAL_CONVERTER_NAME_TC001:"provider_load_test1":1:"provider_load_test1.so"
diff --git a/testcode/testdata/provider/provider_load_test1.c b/testcode/testdata/provider/provider_load_test1.c
index 3f2792e..395b746 100644
--- a/testcode/testdata/provider/provider_load_test1.c
+++ b/testcode/testdata/provider/provider_load_test1.c
@@ -200,7 +200,7 @@ static CRYPT_EAL_Func defProvOutFuncs[] = {
     CRYPT_EAL_FUNC_END
 };
 
-int32_t CRYPT_EAL_ProviderInitcb(CRYPT_EAL_ProvMgrCtx *mgrCtx,
+int32_t CRYPT_EAL_ProviderInit(CRYPT_EAL_ProvMgrCtx *mgrCtx,
     BSL_Param *param, CRYPT_EAL_Func *capFuncs, CRYPT_EAL_Func **outFuncs, void **provCtx)
 {
     CRYPT_RandSeedMethod entroy = {0};
diff --git a/testcode/testdata/provider/provider_load_test2.c b/testcode/testdata/provider/provider_load_test2.c
index 2e29649..1aeb53c 100644
--- a/testcode/testdata/provider/provider_load_test2.c
+++ b/testcode/testdata/provider/provider_load_test2.c
@@ -99,7 +99,7 @@ static CRYPT_EAL_Func defProvOutFuncs[] = {
     CRYPT_EAL_FUNC_END
 };
 
-int32_t CRYPT_EAL_ProviderInitcb(CRYPT_EAL_ProvMgrCtx *mgrCtx,
+int32_t CRYPT_EAL_ProviderInit(CRYPT_EAL_ProvMgrCtx *mgrCtx,
     BSL_Param *param, CRYPT_EAL_Func *capFuncs, CRYPT_EAL_Func **outFuncs, void **provCtx)
 {
     *outFuncs = defProvOutFuncs;
diff --git a/testcode/testdata/provider/provider_load_test_no_fullfunc.c b/testcode/testdata/provider/provider_load_test_no_fullfunc.c
index c1cd9d4..b081d76 100644
--- a/testcode/testdata/provider/provider_load_test_no_fullfunc.c
+++ b/testcode/testdata/provider/provider_load_test_no_fullfunc.c
@@ -58,7 +58,7 @@ int32_t CRYPT_EAL_ProvCtrlCb(void *provCtx, int32_t cmd, void *val, uint32_t val
     return 0;
 }
 
-int32_t CRYPT_EAL_ProviderInitcb(CRYPT_EAL_ProvMgrCtx *mgrCtx,
+int32_t CRYPT_EAL_ProviderInit(CRYPT_EAL_ProvMgrCtx *mgrCtx,
     BSL_Param *param, CRYPT_EAL_Func *capFuncs, CRYPT_EAL_Func **outFuncs, void **provCtx)
 {
     return 0;
diff --git a/testcode/testdata/provider/provider_load_test_providerNoFree.c b/testcode/testdata/provider/provider_load_test_providerNoFree.c
index dc3e68a..972e309 100644
--- a/testcode/testdata/provider/provider_load_test_providerNoFree.c
+++ b/testcode/testdata/provider/provider_load_test_providerNoFree.c
@@ -200,7 +200,7 @@ static CRYPT_EAL_Func defProvOutFuncs[] = {
     CRYPT_EAL_FUNC_END
 };
 
-int32_t CRYPT_EAL_ProviderInitcb(CRYPT_EAL_ProvMgrCtx *mgrCtx,
+int32_t CRYPT_EAL_ProviderInit(CRYPT_EAL_ProvMgrCtx *mgrCtx,
     BSL_Param *param, CRYPT_EAL_Func *capFuncs, CRYPT_EAL_Func **outFuncs, void **provCtx)
 {
     *outFuncs = defProvOutFuncs;
diff --git a/testcode/testdata/provider/provider_load_test_providerNoInit.c b/testcode/testdata/provider/provider_load_test_providerNoInit.c
index e60d8d0..6588ec2 100644
--- a/testcode/testdata/provider/provider_load_test_providerNoInit.c
+++ b/testcode/testdata/provider/provider_load_test_providerNoInit.c
@@ -200,7 +200,7 @@ static CRYPT_EAL_Func defProvOutFuncs[] = {
     CRYPT_EAL_FUNC_END
 };
 
-int32_t CRYPT_EAL_ProviderInitcb(CRYPT_EAL_ProvMgrCtx *mgrCtx,
+int32_t CRYPT_EAL_ProviderInit(CRYPT_EAL_ProvMgrCtx *mgrCtx,
     BSL_Param *param, CRYPT_EAL_Func *capFuncs, CRYPT_EAL_Func **outFuncs, void **provCtx)
 {
     *outFuncs = defProvOutFuncs;
-- 
2.42.0.windows.2

