Closed Bug 1533485 Opened 9 months ago Closed 8 months ago

nsNSSCertificateDB::handleCACertDownload shouldn't assert that it got a non-zero number of certificates

Categories

(Core :: Security: PSM, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: keeler, Assigned: MonikaMaheshwari)

Details

(Whiteboard: [psm-assigned])

Attachments

(1 file)

nsNSSCertificateDB::handleCACertDownload currently asserts in debug builds if it gets passed an array with no certs in it. We should just take that out (in opt builds it returns early, which is fine).

Hey, want to work on this issue.

Sounds good. Let me know if you want any pointers.

Assignee: nobody → monikamaheshwari1996
Priority: P2 → P1
Whiteboard: [psm-backlog] → [psm-assigned]

I have figured out that I think I have to remove this MOZ_ASSERT(numCerts > 0, "Didn't get any certs to import.");. But how to check this issue by running firefox.

Let me see if I can come up with a test file for you to work with.

Flags: needinfo?(dkeeler)

Yeah sure if you could.

I would modify the xpcshell test security/manager/ssl/tests/unit/test_certDB_import.js to add a testcase that calls gCertDB.importCertificates with the given input: "300f06096086480186f8420205a0023000" (that's a hex string - you'll have to convert that to a byte array to pass to importCertificates).

To run the test, run ./mach xpcshell-test security/manager/ssl/tests/unit/test_certDB_import.js. You'll want to do this with and without your other changes to verify that your testcase is effective.

Flags: needinfo?(dkeeler)

(see comment 6)

Flags: needinfo?(monikamaheshwari1996)

Let me know once you modify the test.

Flags: needinfo?(monikamaheshwari1996)

The idea is that you modify the test to validate your fix :)

Flags: needinfo?(monikamaheshwari1996)
Pushed by dkeeler@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0a8395d1c49a
nsNSSCertificateDB::handleCACertDownload shouldn't assert that it got a non-zero number of certificates r=keeler
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Flags: needinfo?(monikamaheshwari1996)
You need to log in before you can comment on or make changes to this bug.