diff options
author | awnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2010-02-19 01:36:55 +0000 |
---|---|---|
committer | awnuk <awnuk@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2010-02-19 01:36:55 +0000 |
commit | 54e709e76948ec8a2a0c74e826b269cd25855656 (patch) | |
tree | 535886f220660b858a99cde746daecc89152e59b /pki/base/ca/src/com/netscape/ca | |
parent | d7d586d7371fec619b78ea8a44d6cb9012992b4e (diff) | |
download | pki-54e709e76948ec8a2a0c74e826b269cd25855656.tar.gz pki-54e709e76948ec8a2a0c74e826b269cd25855656.tar.xz pki-54e709e76948ec8a2a0c74e826b269cd25855656.zip |
Fixed bugzilla bug #549879.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@983 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/ca/src/com/netscape/ca')
-rw-r--r-- | pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java b/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java index 930079d60..0c3d25227 100644 --- a/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java +++ b/pki/base/ca/src/com/netscape/ca/CRLIssuingPoint.java @@ -140,6 +140,7 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable { private boolean mCRLCacheIsCleared = true; private boolean mEnableCacheRecovery = false; private String mFirstUnsaved = null; + private boolean mEnableCacheTesting = false; /** * Last CRL cache update @@ -551,6 +552,7 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable { mEnableCRLCache = config.getBoolean(Constants.PR_ENABLE_CACHE, true); mCacheUpdateInterval = MINUTE * config.getInteger(Constants.PR_CACHE_FREQ, 0); mEnableCacheRecovery = config.getBoolean(Constants.PR_CACHE_RECOVERY, false); + mEnableCacheTesting = config.getBoolean(Constants.PR_CACHE_TESTING, false); // check if CRL generation is enabled mEnableCRLUpdates = config.getBoolean(Constants.PR_ENABLE_CRL, true); @@ -957,6 +959,17 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable { } } + if (name.equals(Constants.PR_CACHE_TESTING)) { + if (value.equals(Constants.FALSE) && mEnableCacheTesting) { + clearCRLCache(); + updateCRLCacheRepository(); + mEnableCacheTesting = false; + setManualUpdate(null); + } else if (value.equals(Constants.TRUE) && (!mEnableCacheTesting)) { + mEnableCacheTesting = true; + } + } + // -- CRL Format -- if (name.equals(Constants.PR_SIGNING_ALGORITHM)) { if (value != null) value = value.trim(); @@ -1946,6 +1959,10 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable { return ((mCRLCerts != null)? mCRLCerts.isEmpty(): true); } + public boolean isCRLCacheTestingEnabled() { + return mEnableCacheTesting; + } + public Date getRevocationDateFromCache(BigInteger serialNumber, boolean checkDeltaCache, boolean includeExpiredCerts) { @@ -2482,12 +2499,17 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable { } if (x509crl != null && mPublisherProcessor != null && mPublisherProcessor.enabled()) { - if (mPublishDN != null) { - mPublisherProcessor.publishCRL(mPublishDN, x509crl); - CMS.debug("CRL published to " + mPublishDN); + Enumeration rules = mPublisherProcessor.getRules(IPublisherProcessor.PROP_LOCAL_CRL); + if (rules == null || !rules.hasMoreElements()) { + CMS.debug("CRL publishing is not enabled."); } else { - mPublisherProcessor.publishCRL(x509crl,getId()); - CMS.debug("CRL published."); + if (mPublishDN != null) { + mPublisherProcessor.publishCRL(mPublishDN, x509crl); + CMS.debug("CRL published to " + mPublishDN); + } else { + mPublisherProcessor.publishCRL(x509crl,getId()); + CMS.debug("CRL published."); + } } } } catch (Exception e) { |