diff options
author | Endi S. Dewata <edewata@redhat.com> | 2017-05-17 22:12:19 +0200 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2017-05-17 22:37:12 +0200 |
commit | 0af026413a65386a0e8c8aba81fe667412ef7f0d (patch) | |
tree | 0f1089441aafb13ae8e591174d1f5c9b839c61de /base/ca | |
parent | 0b32d55d6c41dcdfbd63840a6681b12ad6675946 (diff) | |
download | pki-0af026413a65386a0e8c8aba81fe667412ef7f0d.tar.gz pki-0af026413a65386a0e8c8aba81fe667412ef7f0d.tar.xz pki-0af026413a65386a0e8c8aba81fe667412ef7f0d.zip |
Reformatted RevocationRequestListener.accept().
The RevocationRequestListener.accept() has been reformatted to
adjust the indentations after refactoring.
https://pagure.io/dogtagpki/issue/2651
Change-Id: Ia94667b88dd48e3e0cf28ee3dd7eb5a5b4dee4b3
Diffstat (limited to 'base/ca')
-rw-r--r-- | base/ca/src/com/netscape/ca/CRLIssuingPoint.java | 142 |
1 files changed, 71 insertions, 71 deletions
diff --git a/base/ca/src/com/netscape/ca/CRLIssuingPoint.java b/base/ca/src/com/netscape/ca/CRLIssuingPoint.java index d1053868a..64101d71d 100644 --- a/base/ca/src/com/netscape/ca/CRLIssuingPoint.java +++ b/base/ca/src/com/netscape/ca/CRLIssuingPoint.java @@ -31,23 +31,6 @@ import java.util.StringTokenizer; import java.util.TimeZone; import java.util.Vector; -import netscape.security.util.BitArray; -import netscape.security.x509.AlgorithmId; -import netscape.security.x509.CRLExtensions; -import netscape.security.x509.CRLNumberExtension; -import netscape.security.x509.CRLReasonExtension; -import netscape.security.x509.DeltaCRLIndicatorExtension; -import netscape.security.x509.Extension; -import netscape.security.x509.FreshestCRLExtension; -import netscape.security.x509.IssuingDistributionPoint; -import netscape.security.x509.IssuingDistributionPointExtension; -import netscape.security.x509.RevocationReason; -import netscape.security.x509.RevokedCertImpl; -import netscape.security.x509.RevokedCertificate; -import netscape.security.x509.X509CRLImpl; -import netscape.security.x509.X509CertImpl; -import netscape.security.x509.X509ExtensionException; - import com.netscape.certsrv.apps.CMS; import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.base.IConfigStore; @@ -83,6 +66,23 @@ import com.netscape.cmscore.dbs.CertRecord; import com.netscape.cmscore.dbs.CertificateRepository; import com.netscape.cmscore.util.Debug; +import netscape.security.util.BitArray; +import netscape.security.x509.AlgorithmId; +import netscape.security.x509.CRLExtensions; +import netscape.security.x509.CRLNumberExtension; +import netscape.security.x509.CRLReasonExtension; +import netscape.security.x509.DeltaCRLIndicatorExtension; +import netscape.security.x509.Extension; +import netscape.security.x509.FreshestCRLExtension; +import netscape.security.x509.IssuingDistributionPoint; +import netscape.security.x509.IssuingDistributionPointExtension; +import netscape.security.x509.RevocationReason; +import netscape.security.x509.RevokedCertImpl; +import netscape.security.x509.RevokedCertificate; +import netscape.security.x509.X509CRLImpl; +import netscape.security.x509.X509CertImpl; +import netscape.security.x509.X509ExtensionException; + /** * This class encapsulates CRL issuing mechanism. CertificateAuthority * contains a map of CRLIssuingPoint indexed by string ids. Each issuing @@ -3075,70 +3075,70 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable { return; } - CMS.debug("Revocation listener called."); - // check if serial number is in begin/end range if set. - if (mBeginSerial != null || mEndSerial != null) { - CMS.debug( - "Checking if serial number is between " + - mBeginSerial + " and " + mEndSerial); - BigInteger[] serialNos = - r.getExtDataInBigIntegerArray(IRequest.OLD_SERIALS); + CMS.debug("Revocation listener called."); + // check if serial number is in begin/end range if set. + if (mBeginSerial != null || mEndSerial != null) { + CMS.debug( + "Checking if serial number is between " + + mBeginSerial + " and " + mEndSerial); + BigInteger[] serialNos = + r.getExtDataInBigIntegerArray(IRequest.OLD_SERIALS); - if (serialNos == null || serialNos.length == 0) { - X509CertImpl oldCerts[] = - r.getExtDataInCertArray(IRequest.OLD_CERTS); + if (serialNos == null || serialNos.length == 0) { + X509CertImpl oldCerts[] = + r.getExtDataInCertArray(IRequest.OLD_CERTS); - if (oldCerts == null || oldCerts.length == 0) - return; - serialNos = new BigInteger[oldCerts.length]; - for (int i = 0; i < oldCerts.length; i++) { - serialNos[i] = oldCerts[i].getSerialNumber(); - } + if (oldCerts == null || oldCerts.length == 0) + return; + serialNos = new BigInteger[oldCerts.length]; + for (int i = 0; i < oldCerts.length; i++) { + serialNos[i] = oldCerts[i].getSerialNumber(); } + } - boolean inRange = false; + boolean inRange = false; - for (int i = 0; i < serialNos.length; i++) { - if ((mBeginSerial == null || - serialNos[i].compareTo(mBeginSerial) >= 0) && - (mEndSerial == null || - serialNos[i].compareTo(mEndSerial) <= 0)) { - inRange = true; - } - } - if (!inRange) { - return; + for (int i = 0; i < serialNos.length; i++) { + if ((mBeginSerial == null || + serialNos[i].compareTo(mBeginSerial) >= 0) && + (mEndSerial == null || + serialNos[i].compareTo(mEndSerial) <= 0)) { + inRange = true; } } + if (!inRange) { + return; + } + } - if (mAlwaysUpdate) { - try { - updateCRLNow(); - r.setExtData(mCrlUpdateStatus, IRequest.RES_SUCCESS); - if (mPublisherProcessor != null) { - r.setExtData(mCrlPublishStatus, IRequest.RES_SUCCESS); - } - } catch (EErrorPublishCRL e) { - // error already logged in updateCRLNow(); - r.setExtData(mCrlUpdateStatus, IRequest.RES_SUCCESS); - if (mPublisherProcessor != null) { - r.setExtData(mCrlPublishStatus, IRequest.RES_ERROR); - r.setExtData(mCrlPublishError, e); - } - } catch (EBaseException e) { - log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_CA_ISSUING_UPDATE_CRL", e.toString())); - r.setExtData(mCrlUpdateStatus, IRequest.RES_ERROR); - r.setExtData(mCrlUpdateError, e); - } catch (Exception e) { - log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_CA_ISSUING_UPDATE_CRL", e.toString())); - if (Debug.on()) - Debug.printStackTrace(e); - r.setExtData(mCrlUpdateStatus, IRequest.RES_ERROR); - r.setExtData(mCrlUpdateError, - new EBaseException( - CMS.getUserMessage("CMS_BASE_INTERNAL_ERROR", e.toString()))); + if (mAlwaysUpdate) { + try { + updateCRLNow(); + r.setExtData(mCrlUpdateStatus, IRequest.RES_SUCCESS); + if (mPublisherProcessor != null) { + r.setExtData(mCrlPublishStatus, IRequest.RES_SUCCESS); + } + } catch (EErrorPublishCRL e) { + // error already logged in updateCRLNow(); + r.setExtData(mCrlUpdateStatus, IRequest.RES_SUCCESS); + if (mPublisherProcessor != null) { + r.setExtData(mCrlPublishStatus, IRequest.RES_ERROR); + r.setExtData(mCrlPublishError, e); } + } catch (EBaseException e) { + log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_CA_ISSUING_UPDATE_CRL", e.toString())); + r.setExtData(mCrlUpdateStatus, IRequest.RES_ERROR); + r.setExtData(mCrlUpdateError, e); + } catch (Exception e) { + log(ILogger.LL_FAILURE, CMS.getLogMessage("CMSCORE_CA_ISSUING_UPDATE_CRL", e.toString())); + if (Debug.on()) + Debug.printStackTrace(e); + r.setExtData(mCrlUpdateStatus, IRequest.RES_ERROR); + r.setExtData(mCrlUpdateError, + new EBaseException( + CMS.getUserMessage("CMS_BASE_INTERNAL_ERROR", e.toString()))); } + } } } } |