Closed Bug 886183 Opened 12 years ago Closed 12 years ago

Remove three unused functions from nsIdentityChecking.cpp

Categories

(Core :: Security: PSM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

Details

Attachments

(1 file)

Attached patch Patch (v1)Splinter Review
No description provided.
Attachment #766500 - Flags: review?(bsmith)
This patch removes the function isApprovedForEV from nsIdentityChecking.cpp. In bug 813418, we centralized all the calls to NSS's CERT_Verify*/CERT_PKIXVerifyCert into one place. And, in the process of doing so, we refactored the way EV certificates are validated. Basically, isApprovedForEV just checks the SHA1 fingerprint of the root certificate used for the EV validation with a hard-coded expected SHA1 fingerprint. However, we already restrict the EV certificate verification to roots returned by getRootsForOid, which is a function that maps an EV OID to a set of roots for that OID. In nsNSSComponent::IdentityInfoInit, we already ensure that the mapping used by getRootsForOid is populated with only with certificates that are SHA1 fingerprint matches. Consequently, the call to isApprovedForEV seems to have been completely redundant. And, unsurprisingly, we removed the call to isApprovedForEV. Am I overlooking something that makes the call to isApprovedForEV important? Here is the current EV verification code: https://mxr.mozilla.org/mozilla-central/source/security/manager/ssl/src/CertVerifier.cpp?rev=6b2f29bc6da8#150
OS: Mac OS X → All
Hardware: x86 → All
The point of this patch is that there is nothing that calls isApprovedForEV in the tree: <http://mxr.mozilla.org/mozilla-central/search?string=isApprovedForEV>. In other words, I'm just removing dead code.
Attachment #766500 - Flags: review?(brian) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: