diff options
author | awnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2009-02-24 23:50:53 +0000 |
---|---|---|
committer | awnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2009-02-24 23:50:53 +0000 |
commit | 6ee545f5187c20c93b5983f7f0d70fc0f397a1b5 (patch) | |
tree | 5f7e62bd724e2825ef6114908533f6ee10c7aa1c | |
parent | 038c6ef0d6adfcf488ff9146daec271b2f05c450 (diff) | |
download | pki-6ee545f5187c20c93b5983f7f0d70fc0f397a1b5.tar.gz pki-6ee545f5187c20c93b5983f7f0d70fc0f397a1b5.tar.xz pki-6ee545f5187c20c93b5983f7f0d70fc0f397a1b5.zip |
Fixed bugzilla bug #449857.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@241 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
-rw-r--r-- | pki/base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/pki/base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java b/pki/base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java index 9d0eab104..70cdea120 100644 --- a/pki/base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java +++ b/pki/base/common/src/com/netscape/cmscore/ldap/PublisherProcessor.java @@ -1287,10 +1287,11 @@ public class PublisherProcessor implements IRequest r, Object obj) throws ELdapException { if (!enabled()) return; +CMS.debug("PublisherProcessor: in publishNow()"); LDAPConnection conn = null; try { - String dirdn = null; + Object dirdn = null; if (mapper != null) { LdapCertMapResult result = null; @@ -1299,7 +1300,12 @@ public class PublisherProcessor implements conn = mLdapConnModule.getConn(); } try { - dirdn = mapper.map(conn, r, obj); + if ((mapper instanceof com.netscape.cms.publish.mappers.LdapCertSubjMap) && + ((com.netscape.cms.publish.mappers.LdapCertSubjMap)mapper).useAllEntries()) { + dirdn = ((com.netscape.cms.publish.mappers.LdapCertSubjMap)mapper).mapAll(conn, r, obj); + } else { + dirdn = mapper.map(conn, r, obj); + } } catch (Throwable e1) { CMS.debug("Error mapping: mapper=" + mapper + " error=" + e1.toString()); throw e1; @@ -1309,7 +1315,14 @@ public class PublisherProcessor implements X509Certificate cert = (X509Certificate) obj; try { - publisher.publish(conn, dirdn, cert); + if (dirdn instanceof String) { + publisher.publish(conn, (String)dirdn, cert); + } else if (dirdn instanceof Vector) { + int n = ((Vector)dirdn).size(); + for (int i = 0; i < n; i++) { + publisher.publish(conn, (String)(((Vector)dirdn).elementAt(i)), cert); + } + } } catch (Throwable e1) { CMS.debug("Error publishing: publisher=" + publisher + " error=" + e1.toString()); throw e1; |