Closed Bug 379298 Opened 18 years ago Closed 11 years ago

PSM error dialog still shows error code in hexadecimal

Categories

(Core :: Security: PSM, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: nelson, Unassigned)

References

Details

Attachments

(1 file)

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a4pre) Gecko/20070418 SeaMonkey/1.5a I thought PSM (on the trunk) got rid of all error messages that showed negative decimal and hexadecimal error codes. But today I tried to download a CRL from http://www.sun.com/pki/pkirootca.crl and got this error dialog: > Alert > The browser cannot import the Certificate Revocation List (CRL). > Error Importing CRL to local Database. Error Code:ffffe00b > Please ask your system administrator for assistance. The complaint here is that we showed the user the unintelligible ffffe00b instead of giving him the error message: "Peer's certificate has expired."
Summary: PSM error dialog still shows error code in hexadecimall → PSM error dialog still shows error code in hexadecimal
Also, ABSOLUTELY NO MOZILLA ERROR DIALOGS SHOULD *EVER* TELL USERS TO "ask you system administrator for assistance". Any "UI Expert" who insists on that inane verbage should have HIS EMAIL address put into that statement instead. e.g. "Ask <inane@mozilla.com> for assistance."
reassign bug owner. mass-update-kaie-20120918
Assignee: kaie → nobody
Brian: thank you for providing the sample code to get the error message for an NSS error code in bug 816495 comment 9. It is more complicated than I expected, so I'd like to make this simple change first. Why isn't there a function to get the error message for an NSS error code?
Attachment #692040 - Flags: review?(bsmith)
wtc: Isn't the function PR_ErrorToName and PR_ErrorToString? NSS registers itself with the NSPR error tables (via PR_ErrorInstallTable in util/errstrs.c). Or are you asking why it isn't exposed via the PORT wrapper interface?
Ryan: I browsed in the source tree and found the function I had in mind: nsNSSErrors::getErrorMessageFromCode: http://mxr.mozilla.org/mozilla-central/ident?i=getDefaultErrorStringName It is called by the NSSErrorsService::GetErrorMessage() function that Brian suggested. Since nsNSSErrors::getErrorMessageFromCode is a static method and nsCRLManager is in the same directory in the source tree, can I bypass the XPCOM and call nsNSSErrors::getErrorMessageFromCode directly?
Fixed by removing nsCRLManager completely in bug 379298.
Status: NEW → RESOLVED
Closed: 11 years ago
Depends on: 867465
Resolution: --- → WORKSFORME
Comment on attachment 692040 [details] [diff] [review] Print the error code as a signed decimal integer The bug got resolved WORKSFORME in the meantime.
Attachment #692040 - Flags: review?(brian)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: