diff options
author | alee <alee@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2009-01-05 16:58:25 +0000 |
---|---|---|
committer | alee <alee@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2009-01-05 16:58:25 +0000 |
commit | 12037cf9cf935bda5259e531b11a876ff2b41098 (patch) | |
tree | 2dd9029e94369398638d8467ddd895acae80cfb3 /pki/base/ca/src/com/netscape/ca/CertificateAuthority.java | |
parent | dca02910f6de3f9631589ee3c12c229fa58629c8 (diff) | |
download | pki-12037cf9cf935bda5259e531b11a876ff2b41098.tar.gz pki-12037cf9cf935bda5259e531b11a876ff2b41098.tar.xz pki-12037cf9cf935bda5259e531b11a876ff2b41098.zip |
BZ472006 Serial number management
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@168 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/ca/src/com/netscape/ca/CertificateAuthority.java')
-rw-r--r-- | pki/base/ca/src/com/netscape/ca/CertificateAuthority.java | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java b/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java index 151b15ccf..4f459ee4a 100644 --- a/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java +++ b/pki/base/ca/src/com/netscape/ca/CertificateAuthority.java @@ -44,6 +44,7 @@ import com.netscape.certsrv.dbs.*; import com.netscape.certsrv.dbs.repository.*; import com.netscape.cmscore.dbs.*; import com.netscape.certsrv.dbs.certdb.*; +import com.netscape.certsrv.dbs.replicadb.*; import com.netscape.certsrv.dbs.crldb.*; import com.netscape.certsrv.dbs.crldb.ICRLRepository; import com.netscape.certsrv.apps.*; @@ -104,6 +105,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori protected CertificateRepository mCertRepot = null; protected CRLRepository mCRLRepot = null; + protected ReplicaIDRepository mReplicaRepot = null; protected CertificateChain mCACertChain = null; protected CertificateChain mOCSPCertChain = null; @@ -144,6 +146,7 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori protected static final String PROP_CERT_REPOS_DN = "CertificateRepositoryDN"; protected static final String PROP_REPOS_DN = "RepositoryDN"; + protected static final String PROP_REPLICAID_DN = "dbs.replicadn"; // for the notification listeners @@ -267,21 +270,23 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori // init default CA attributes like cert version, validity. initDefCaAttrs(); + // init web gateway. + initWebGateway(); + + // init request queue and related modules. + CMS.debug("CertificateAuthority init: initRequestQueue"); + initRequestQueue(); + // set certificate status to 10 minutes mCertRepot.setCertStatusUpdateInterval( + mRequestQueue.getRequestRepository(), mConfig.getInteger("certStatusUpdateInterval", 10 * 60), mConfig.getBoolean("listenToCloneModifications", false)); mCertRepot.setConsistencyCheck( mConfig.getBoolean("ConsistencyCheck", false)); mCertRepot.setSkipIfInConsistent( mConfig.getBoolean("SkipIfInConsistent", false)); - - // init web gateway. - initWebGateway(); - - // init request queue and related modules. - CMS.debug("CertificateAuthority init: initRequestQueue"); - initRequestQueue(); + mService.init(config.getSubStore("connector")); initMiscellaneousListeners(); @@ -569,6 +574,17 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori public ICertificateRepository getCertificateRepository() { return mCertRepot; } + + /** + * Retrieves replica repository. + * <P> + * + * @return replica repository + */ + public IReplicaIDRepository getReplicaRepository() { + return mReplicaRepot; + } + /** * Retrieves CRL repository. @@ -1317,6 +1333,15 @@ public class CertificateAuthority implements ICertificateAuthority, ICertAuthori "ou=crlIssuingPoints, ou=" + getId() + ", " + getDBSubsystem().getBaseDN()); CMS.debug("CRL Repot inited"); + + String replicaReposDN = mConfig.getString(PROP_REPLICAID_DN, null); + if (replicaReposDN == null) { + replicaReposDN = "ou=Replica," + getDBSubsystem().getBaseDN(); + } + mReplicaRepot = new ReplicaIDRepository( + DBSubsystem.getInstance(), 1, replicaReposDN); + CMS.debug("Replica Repot inited"); + } /** |