зеркало из https://github.com/mozilla/gecko-dev.git
Bugzilla bug 342582: need to set slotID. Other minor fixes.
This commit is contained in:
Родитель
bd735b0358
Коммит
20531859de
|
@ -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;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче