diff --git a/base/ca/src/main/java/com/netscape/ca/AuthorityMonitor.java b/base/ca/src/main/java/com/netscape/ca/AuthorityMonitor.java index 0c63e930cc7..2a89c5354ad 100644 --- a/base/ca/src/main/java/com/netscape/ca/AuthorityMonitor.java +++ b/base/ca/src/main/java/com/netscape/ca/AuthorityMonitor.java @@ -279,6 +279,10 @@ private synchronized void handleDELETE(LDAPEntry entry) { } } + public void addCA(AuthorityID aid, CertificateAuthority ca) { + authorities.put(aid, ca); + } + public synchronized void trackUpdate(AuthorityID aid, LDAPControl[] responseControls) { LDAPPostReadControl control = (LDAPPostReadControl) diff --git a/base/ca/src/main/java/org/dogtagpki/server/ca/CAEngine.java b/base/ca/src/main/java/org/dogtagpki/server/ca/CAEngine.java index 893219bb3c1..bee661dd05f 100644 --- a/base/ca/src/main/java/org/dogtagpki/server/ca/CAEngine.java +++ b/base/ca/src/main/java/org/dogtagpki/server/ca/CAEngine.java @@ -603,7 +603,7 @@ public void initAuthorityMonitor() throws Exception { if (!authorityMonitor.foundHostCA) { logger.debug("CAEngine: No entry for host authority"); logger.debug("CAEngine: Adding entry for host authority"); - addCA(addHostAuthorityEntry(), hostCA); + authorityMonitor.addCA(addHostAuthorityEntry(), hostCA); } } @@ -1013,10 +1013,6 @@ public CertificateAuthority getCA(X500Name dn) { return null; } - public void addCA(AuthorityID aid, CertificateAuthority ca) { - authorityMonitor.authorities.put(aid, ca); - } - public void removeCA(AuthorityID aid) { authorityMonitor.authorities.remove(aid); authorityMonitor.entryUSNs.remove(aid); @@ -1371,7 +1367,7 @@ public synchronized void readAuthority(LDAPEntry entry) throws Exception { logger.info("CAEngine: - description: " + desc); hostCA.setAuthorityDescription(desc); - addCA(aid, hostCA); + authorityMonitor.addCA(aid, hostCA); return; } @@ -1456,7 +1452,7 @@ public synchronized void readAuthority(LDAPEntry entry) throws Exception { ca.setCMSEngine(this); ca.init(caConfig); - addCA(aid, ca); + authorityMonitor.addCA(aid, ca); authorityMonitor.entryUSNs.put(aid, newEntryUSN); authorityMonitor.nsUniqueIds.put(aid, nsUniqueId);