From 1928a929d59332ff40eaf7e3d885573f6d04ad48 Mon Sep 17 00:00:00 2001 From: "kaie%kuix.de" Date: Mon, 2 Oct 2006 20:06:27 +0000 Subject: [PATCH] Bug 352401, Cert Manager: If issuer org is empty, fall back to display common name r=rrelyea --- security/manager/ssl/src/nsCertTree.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/security/manager/ssl/src/nsCertTree.cpp b/security/manager/ssl/src/nsCertTree.cpp index f8ee9329c487..88ef0f6c9cc6 100644 --- a/security/manager/ssl/src/nsCertTree.cpp +++ b/security/manager/ssl/src/nsCertTree.cpp @@ -432,7 +432,10 @@ nsCertTree::UpdateUIContents() nsCOMPtr isupport = dont_AddRef(mCertArray->ElementAt(j)); nsCOMPtr orgCert = do_QueryInterface(isupport); for (PRInt32 i=0; iGetIssuerOrganization(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);