Bug 352401, Cert Manager: If issuer org is empty, fall back to display common name

r=rrelyea
This commit is contained in:
kaie%kuix.de 2006-10-02 20:06:27 +00:00
parent e7cd6c578f
commit 1928a929d5

View File

@ -432,7 +432,10 @@ nsCertTree::UpdateUIContents()
nsCOMPtr<nsISupports> isupport = dont_AddRef(mCertArray->ElementAt(j));
nsCOMPtr<nsIX509Cert> orgCert = do_QueryInterface(isupport);
for (PRInt32 i=0; i<mNumOrgs; i++) {
orgCert->GetIssuerOrganization(mTreeArray[i].orgName);
nsString &orgNameRef = mTreeArray[i].orgName;
orgCert->GetIssuerOrganization(orgNameRef);
if (orgNameRef.IsEmpty())
orgCert->GetCommonName(orgNameRef);
mTreeArray[i].open = PR_TRUE;
mTreeArray[i].certIndex = j;
mTreeArray[i].numChildren = 1;
@ -1028,6 +1031,8 @@ nsCertTree::CmpInitCriterion(nsIX509Cert *cert, CompareCacheHashEntry *entry,
switch (crit) {
case sort_IssuerOrg:
cert->GetIssuerOrganization(str);
if (str.IsEmpty())
cert->GetCommonName(str);
break;
case sort_Org:
cert->GetOrganization(str);