mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-08-08 06:03:47 +08:00
update SDF meth
This commit is contained in:
@@ -1232,12 +1232,12 @@ int SDF_CreateFile(
|
|||||||
{
|
{
|
||||||
int ret = SDR_UNKNOWERR;
|
int ret = SDR_UNKNOWERR;
|
||||||
|
|
||||||
if (!sdf_method || !sdf_method->CreateFile) {
|
if (!sdf_method || !sdf_method->CreateFileObject) {
|
||||||
SDFerr(SDF_F_SDF_CREATEFILE, SDF_R_NOT_INITIALIZED);
|
SDFerr(SDF_F_SDF_CREATEFILE, SDF_R_NOT_INITIALIZED);
|
||||||
return SDR_NOTSUPPORT;
|
return SDR_NOTSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ret = sdf_method->CreateFile(
|
if ((ret = sdf_method->CreateFileObject(
|
||||||
hSessionHandle,
|
hSessionHandle,
|
||||||
pucFileName,
|
pucFileName,
|
||||||
uiNameLen,
|
uiNameLen,
|
||||||
@@ -1259,12 +1259,12 @@ int SDF_ReadFile(
|
|||||||
{
|
{
|
||||||
int ret = SDR_UNKNOWERR;
|
int ret = SDR_UNKNOWERR;
|
||||||
|
|
||||||
if (!sdf_method || !sdf_method->ReadFile) {
|
if (!sdf_method || !sdf_method->ReadFileObject) {
|
||||||
SDFerr(SDF_F_SDF_READFILE, SDF_R_NOT_INITIALIZED);
|
SDFerr(SDF_F_SDF_READFILE, SDF_R_NOT_INITIALIZED);
|
||||||
return SDR_NOTSUPPORT;
|
return SDR_NOTSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ret = sdf_method->ReadFile(
|
if ((ret = sdf_method->ReadFileObject(
|
||||||
hSessionHandle,
|
hSessionHandle,
|
||||||
pucFileName,
|
pucFileName,
|
||||||
uiNameLen,
|
uiNameLen,
|
||||||
@@ -1288,12 +1288,12 @@ int SDF_WriteFile(
|
|||||||
{
|
{
|
||||||
int ret = SDR_UNKNOWERR;
|
int ret = SDR_UNKNOWERR;
|
||||||
|
|
||||||
if (!sdf_method || !sdf_method->WriteFile) {
|
if (!sdf_method || !sdf_method->WriteFileObject) {
|
||||||
SDFerr(SDF_F_SDF_WRITEFILE, SDF_R_NOT_INITIALIZED);
|
SDFerr(SDF_F_SDF_WRITEFILE, SDF_R_NOT_INITIALIZED);
|
||||||
return SDR_NOTSUPPORT;
|
return SDR_NOTSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ret = sdf_method->WriteFile(
|
if ((ret = sdf_method->WriteFileObject(
|
||||||
hSessionHandle,
|
hSessionHandle,
|
||||||
pucFileName,
|
pucFileName,
|
||||||
uiNameLen,
|
uiNameLen,
|
||||||
@@ -1314,12 +1314,12 @@ int SDF_DeleteFile(
|
|||||||
{
|
{
|
||||||
int ret = SDR_UNKNOWERR;
|
int ret = SDR_UNKNOWERR;
|
||||||
|
|
||||||
if (!sdf_method || !sdf_method->DeleteFile) {
|
if (!sdf_method || !sdf_method->DeleteFileObject) {
|
||||||
SDFerr(SDF_F_SDF_DELETEFILE, SDF_R_NOT_INITIALIZED);
|
SDFerr(SDF_F_SDF_DELETEFILE, SDF_R_NOT_INITIALIZED);
|
||||||
return SDR_NOTSUPPORT;
|
return SDR_NOTSUPPORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((ret = sdf_method->DeleteFile(
|
if ((ret = sdf_method->DeleteFileObject(
|
||||||
hSessionHandle,
|
hSessionHandle,
|
||||||
pucFileName,
|
pucFileName,
|
||||||
uiNameLen)) != SDR_OK) {
|
uiNameLen)) != SDR_OK) {
|
||||||
|
|||||||
@@ -108,10 +108,10 @@ SDF_METHOD *SDF_METHOD_load_library(const char *so_path)
|
|||||||
sdf->HashInit = (SDF_HashInit_FuncPtr)DSO_bind_func(dso, "SDF_HashInit");
|
sdf->HashInit = (SDF_HashInit_FuncPtr)DSO_bind_func(dso, "SDF_HashInit");
|
||||||
sdf->HashUpdate = (SDF_HashUpdate_FuncPtr)DSO_bind_func(dso, "SDF_HashUpdate");
|
sdf->HashUpdate = (SDF_HashUpdate_FuncPtr)DSO_bind_func(dso, "SDF_HashUpdate");
|
||||||
sdf->HashFinal = (SDF_HashFinal_FuncPtr)DSO_bind_func(dso, "SDF_HashFinal");
|
sdf->HashFinal = (SDF_HashFinal_FuncPtr)DSO_bind_func(dso, "SDF_HashFinal");
|
||||||
sdf->CreateFile = (SDF_CreateFile_FuncPtr)DSO_bind_func(dso, "SDF_CreateFile");
|
sdf->CreateFileObject = (SDF_CreateFile_FuncPtr)DSO_bind_func(dso, "SDF_CreateFile");
|
||||||
sdf->ReadFile = (SDF_ReadFile_FuncPtr)DSO_bind_func(dso, "SDF_ReadFile");
|
sdf->ReadFileObject = (SDF_ReadFile_FuncPtr)DSO_bind_func(dso, "SDF_ReadFile");
|
||||||
sdf->WriteFile = (SDF_WriteFile_FuncPtr)DSO_bind_func(dso, "SDF_WriteFile");
|
sdf->WriteFileObject = (SDF_WriteFile_FuncPtr)DSO_bind_func(dso, "SDF_WriteFile");
|
||||||
sdf->DeleteFile = (SDF_DeleteFile_FuncPtr)DSO_bind_func(dso, "SDF_DeleteFile");
|
sdf->DeleteFileObject = (SDF_DeleteFile_FuncPtr)DSO_bind_func(dso, "SDF_DeleteFile");
|
||||||
|
|
||||||
|
|
||||||
ret = sdf;
|
ret = sdf;
|
||||||
|
|||||||
@@ -432,10 +432,10 @@ typedef struct sdf_method_st {
|
|||||||
SDF_HashInit_FuncPtr HashInit;
|
SDF_HashInit_FuncPtr HashInit;
|
||||||
SDF_HashUpdate_FuncPtr HashUpdate;
|
SDF_HashUpdate_FuncPtr HashUpdate;
|
||||||
SDF_HashFinal_FuncPtr HashFinal;
|
SDF_HashFinal_FuncPtr HashFinal;
|
||||||
SDF_CreateFile_FuncPtr CreateFile;
|
SDF_CreateFile_FuncPtr CreateFileObject;
|
||||||
SDF_ReadFile_FuncPtr ReadFile;
|
SDF_ReadFile_FuncPtr ReadFileObject;
|
||||||
SDF_WriteFile_FuncPtr WriteFile;
|
SDF_WriteFile_FuncPtr WriteFileObject;
|
||||||
SDF_DeleteFile_FuncPtr DeleteFile;
|
SDF_DeleteFile_FuncPtr DeleteFileObject;
|
||||||
} SDF_METHOD;
|
} SDF_METHOD;
|
||||||
|
|
||||||
SDF_METHOD *SDF_METHOD_load_library(const char *so_path);
|
SDF_METHOD *SDF_METHOD_load_library(const char *so_path);
|
||||||
|
|||||||
Reference in New Issue
Block a user