mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
Fix for 125143 - allow modutil to report PKCS#11 library load failure errors
This commit is contained in:
parent
3c6a4b6df9
commit
7716bf30c8
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user