Fix for 125143 - allow modutil to report PKCS#11 library load failure errors

This commit is contained in:
jpierre%netscape.com 2002-02-13 01:43:10 +00:00
Родитель 3c6a4b6df9
Коммит 7716bf30c8
2 изменённых файлов: 4 добавлений и 4 удалений

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

@ -233,8 +233,6 @@ AddModule(char *moduleName, char *libFile, char *cipherString,
ciphers =
getFlagsFromString(cipherString, cipherStrings, numCipherStrings);
PR_SetErrorText(NULL,0);
status =
SECMOD_AddNewModule(moduleName, libFile,
SECMOD_PubMechFlagstoInternal(mechanisms),
@ -244,12 +242,12 @@ AddModule(char *moduleName, char *libFile, char *cipherString,
char* errtxt=NULL;
PRInt32 copied = 0;
if (PR_GetErrorTextLength()) {
errtxt = malloc(PR_GetErrorTextLength());
errtxt = PR_Malloc(PR_GetErrorTextLength());
copied = PR_GetErrorText(errtxt);
}
if (copied && errtxt) {
PR_fprintf(PR_STDERR, errStrings[ADD_MODULE_FAILED_STATUS_ERR], moduleName, errtxt);
free(errtxt);
PR_Free(errtxt);
}
else {
PR_fprintf(PR_STDERR, errStrings[ADD_MODULE_FAILED_ERR], moduleName);

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

@ -416,6 +416,8 @@ SECStatus SECMOD_AddNewModule(char* moduleName, char* dllPath,
int s,i;
PK11SlotInfo* slot;
PR_SetErrorText(0, NULL);
module = SECMOD_CreateModule(dllPath,moduleName,NULL, NULL);
if (module->dllName != NULL) {