Bug 83536.
Merge script principal implementations into one class. Should reduce footprint, speed up calls to caps a little bit, and fixes several memory leaks. Also fixes bugs 211174 and 211263 r=jst@netscape.com sr=bzbarsky@mit.edu moa=mstoltz@netscape.com (he looked at an earlier patch and said it looked fine, and will do a retroactive review when he returns from vacation as well) git-svn-id: svn://10.0.0.236/trunk@145137 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -55,7 +55,6 @@
|
||||
|
||||
#include "nsIJAR.h"
|
||||
#include "nsIPrincipal.h"
|
||||
#include "nsICertificatePrincipal.h"
|
||||
|
||||
static NS_DEFINE_CID(kSoftwareUpdateCID, NS_SoftwareUpdate_CID);
|
||||
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
@@ -82,8 +81,9 @@ nsresult VerifySigning(nsIZipReader* hZip, nsIPrincipal* aPrincipal)
|
||||
if (!aPrincipal)
|
||||
return NS_OK; // not signed, but not an error
|
||||
|
||||
nsCOMPtr<nsICertificatePrincipal> cp(do_QueryInterface(aPrincipal));
|
||||
if (!cp)
|
||||
PRBool hasCert;
|
||||
aPrincipal->GetHasCertificate(&hasCert);
|
||||
if (!hasCert)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
nsCOMPtr<nsIJAR> jar(do_QueryInterface(hZip));
|
||||
|
||||
Reference in New Issue
Block a user