Closed Bug 934327 Opened 6 years ago Closed 6 years ago

Give OCSP-related NSS errors symbolic names in xpcshell tests

Categories

(Core :: Security: PSM, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla28
Tracking Status
firefox27 --- fixed
firefox28 --- fixed
b2g-v1.2 --- fixed

People

(Reporter: briansmith, Assigned: briansmith)

Details

(Whiteboard: [qa-])

Attachments

(1 file)

Comment on attachment 826579 [details] [diff] [review]
Give OCSP-related NSS errors symbolic names in xpcshell tests

Review of attachment 826579 [details] [diff] [review]:
-----------------------------------------------------------------

::: security/manager/ssl/tests/unit/head_psm.js
@@ +26,5 @@
> +const SEC_ERROR_OCSP_UNAUTHORIZED_REQUEST               = SEC_ERROR_BASE + 124;
> +const SEC_ERROR_OCSP_UNKNOWN_CERT                       = SEC_ERROR_BASE + 126;
> +const SEC_ERROR_OCSP_MALFORMED_RESPONSE                 = SEC_ERROR_BASE + 129;
> +const SEC_ERROR_OCSP_UNAUTHORIZED_RESPONSE              = SEC_ERROR_BASE + 130;
> +const SEC_ERROR_OCSP_OLD_RESPONSE                       = SEC_ERROR_BASE + 132;  

I will fix the whitespace
Attachment #826579 - Flags: review?(dkeeler)
Comment on attachment 826579 [details] [diff] [review]
Give OCSP-related NSS errors symbolic names in xpcshell tests

Review of attachment 826579 [details] [diff] [review]:
-----------------------------------------------------------------

Cool. r=me with either the change to Ci.nsINSSErrorsService.NSS_SEC_ERROR_BASE or a good reason to not do it.

::: security/manager/ssl/tests/unit/head_psm.js
@@ +14,5 @@
>  let { ctypes } = Cu.import("resource://gre/modules/ctypes.jsm");
>  
>  let gIsWindows = ("@mozilla.org/windows-registry-key;1" in Cc);
>  
> +const SEC_ERROR_BASE = -0x2000;

I think it makes sense to use Ci.nsINSSErrorsService.NSS_SEC_ERROR_BASE here.
Attachment #826579 - Flags: review?(dkeeler) → review+
https://hg.mozilla.org/mozilla-central/rev/2306c8fdea11
Assignee: nobody → brian
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Flags: in-testsuite?
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.