Bugzilla bug 342582: need to set slotID. Other minor fixes.

This commit is contained in:
wtchang%redhat.com 2006-09-01 22:15:37 +00:00
Родитель bd735b0358
Коммит 20531859de
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -53,9 +53,9 @@
#define LIB_NAME "softokn3.dll" #define LIB_NAME "softokn3.dll"
#include "cryptoki.h" #include "cryptoki.h"
#else #else
#include <prprf.h> #include "prprf.h"
#include "prlink.h" #include "prlink.h"
#include "../../lib/softoken/pkcs11.h" #include "pkcs11.h"
#endif #endif
@ -578,10 +578,12 @@ int main(int argc, char **argv)
pC_GetFunctionList = (CK_C_GetFunctionList) PR_FindFunctionSymbol(lib, pC_GetFunctionList = (CK_C_GetFunctionList) PR_FindFunctionSymbol(lib,
"FC_GetFunctionList"); "FC_GetFunctionList");
assert(pC_GetFunctionList != NULL); assert(pC_GetFunctionList != NULL);
slotID = 0;
} else { } else {
pC_GetFunctionList = (CK_C_GetFunctionList) PR_FindFunctionSymbol(lib, pC_GetFunctionList = (CK_C_GetFunctionList) PR_FindFunctionSymbol(lib,
"C_GetFunctionList"); "C_GetFunctionList");
assert(pC_GetFunctionList != NULL); assert(pC_GetFunctionList != NULL);
slotID = 1;
} }
#endif #endif
@ -824,7 +826,7 @@ int main(int argc, char **argv)
FreeLibrary(hModule); FreeLibrary(hModule);
#else #else
if (PR_UnloadLibrary(lib) != PR_SUCCESS) { if (PR_UnloadLibrary(lib) != PR_SUCCESS) {
PKM_Error("unable to unload softoken"); PKM_Error("unable to unload softoken\n");
} }
#endif #endif
return 0; return 0;