diff --git a/base/ca/src/main/java/com/netscape/ca/CertificateAuthority.java b/base/ca/src/main/java/com/netscape/ca/CertificateAuthority.java index ba63746bd3c..e7313383c18 100644 --- a/base/ca/src/main/java/com/netscape/ca/CertificateAuthority.java +++ b/base/ca/src/main/java/com/netscape/ca/CertificateAuthority.java @@ -199,6 +199,8 @@ public class CertificateAuthority extends Subsystem implements IAuthority, IOCSP protected int fastSigning; protected boolean ocspResponderByName; + protected CertificateRepository certRepository; + protected CASigningUnit mSigningUnit; protected CASigningUnit mOCSPSigningUnit; protected CASigningUnit mCRLSigningUnit; @@ -390,6 +392,14 @@ public void setOCSPResponderByName(boolean ocspResponderByName) { this.ocspResponderByName = ocspResponderByName; } + public CertificateRepository getCertRepository() { + return certRepository; + } + + public void setCertRepository(CertificateRepository certRepository) { + this.certRepository = certRepository; + } + /** * Retrieves the default signature algorithm of this certificate authority. * @@ -1007,7 +1017,6 @@ public SingleResponse processRequest(Request req) throws EBaseException { String name = "CertificateAuthority: processRequest: "; CAEngine engine = CAEngine.getInstance(); - CertificateRepository certificateRepository = engine.getCertificateRepository(); X509CertImpl caCert = mSigningUnit.getCertImpl(); X509Key key = (X509Key) caCert.getPublicKey(); @@ -1070,7 +1079,7 @@ public SingleResponse processRequest(Request req) throws EBaseException { } try { - CertRecord rec = certificateRepository.readCertificateRecord(serialNo); + CertRecord rec = certRepository.readCertificateRecord(serialNo); String status = rec.getStatus(); if (status == null) { 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 d3738e4616c..2b9bf584df3 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 @@ -1951,6 +1951,8 @@ public void initCA(CertificateAuthority ca) throws Exception { ca.setFastSigning(fastSigning); ca.setOCSPResponderByName(ocspResponderByName); + ca.setCertRepository(certificateRepository); + try { initCertSigningUnit(ca); initCRLSigningUnit(ca);