summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/ca/src/com/netscape/ca/CRLIssuingPoint.java27
-rw-r--r--base/common/src/com/netscape/certsrv/common/Constants.java1
-rw-r--r--base/console/src/com/netscape/admin/certsrv/config/CMSCRLSettingPanel.java72
-rw-r--r--dogtag/console-ui/src/CMSAdminRS.properties5
4 files changed, 105 insertions, 0 deletions
diff --git a/base/ca/src/com/netscape/ca/CRLIssuingPoint.java b/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
index db30d3988..2700bef30 100644
--- a/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
+++ b/base/ca/src/com/netscape/ca/CRLIssuingPoint.java
@@ -239,6 +239,11 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
*/
private long mNextUpdateGracePeriod;
+ /**
+ * next update as this update extension
+ */
+ private long mNextAsThisUpdateExtension;
+
/**
* Boolean flag controlling whether CRLv2 extensions are to be
* used in CRL.
@@ -702,6 +707,9 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
// get next update grace period
mNextUpdateGracePeriod = MINUTE * config.getInteger(Constants.PR_GRACE_PERIOD, 0);
+ // get next update as this update extension
+ mNextAsThisUpdateExtension = MINUTE * config.getInteger(Constants.PR_NEXT_AS_THIS_EXTENSION, 0);
+
// Get V2 or V1 CRL
mAllowExtensions = config.getBoolean(Constants.PR_EXTENSIONS, false);
@@ -1049,6 +1057,16 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
}
}
+ if (name.equals(Constants.PR_NEXT_AS_THIS_EXTENSION)) {
+ try {
+ if (value != null && value.length() > 0) {
+ mNextAsThisUpdateExtension = MINUTE * Long.parseLong(value.trim());
+ }
+ } catch (NumberFormatException e) {
+ noRestart = false;
+ }
+ }
+
// -- CRL Cache --
if (name.equals(Constants.PR_ENABLE_CACHE)) {
if (value.equals(Constants.FALSE) && mEnableCRLCache) {
@@ -2414,6 +2432,15 @@ public class CRLIssuingPoint implements ICRLIssuingPoint, Runnable {
mLastUpdate = thisUpdate;
// mNextUpdate = nextUpdate;
mNextDeltaUpdate = (nextDeltaUpdate != null) ? new Date(nextDeltaUpdate.getTime()) : null;
+ if (mNextAsThisUpdateExtension > 0) {
+ Date nextUpdateAsThisUpdateExtension = new Date(thisUpdate.getTime()+mNextAsThisUpdateExtension);
+ if (nextUpdate != null && nextUpdate.before(nextUpdateAsThisUpdateExtension)) {
+ nextUpdate = nextUpdateAsThisUpdateExtension;
+ }
+ if (nextDeltaUpdate != null && nextDeltaUpdate.before(nextUpdateAsThisUpdateExtension)) {
+ nextDeltaUpdate = nextUpdateAsThisUpdateExtension;
+ }
+ }
if (nextUpdate != null) {
nextUpdate.setTime((nextUpdate.getTime()) + mNextUpdateGracePeriod);
}
diff --git a/base/common/src/com/netscape/certsrv/common/Constants.java b/base/common/src/com/netscape/certsrv/common/Constants.java
index bc8dcefad..d91fded2e 100644
--- a/base/common/src/com/netscape/certsrv/common/Constants.java
+++ b/base/common/src/com/netscape/certsrv/common/Constants.java
@@ -215,6 +215,7 @@ public interface Constants {
public final static String PR_ENABLE_FREQ = "enableUpdateInterval";
public final static String PR_UPDATE_FREQ = "autoUpdateInterval";
public final static String PR_GRACE_PERIOD = "nextUpdateGracePeriod";
+ public final static String PR_NEXT_AS_THIS_EXTENSION = "nextAsThisUpdateExtension";
public final static String PR_ENABLE_CACHE = "enableCRLCache";
public final static String PR_CACHE_FREQ = "cacheUpdateInterval";
public final static String PR_CACHE_RECOVERY = "enableCacheRecovery";
diff --git a/base/console/src/com/netscape/admin/certsrv/config/CMSCRLSettingPanel.java b/base/console/src/com/netscape/admin/certsrv/config/CMSCRLSettingPanel.java
index b55022921..daca0c89d 100644
--- a/base/console/src/com/netscape/admin/certsrv/config/CMSCRLSettingPanel.java
+++ b/base/console/src/com/netscape/admin/certsrv/config/CMSCRLSettingPanel.java
@@ -59,6 +59,9 @@ public class CMSCRLSettingPanel extends CMSBaseTab {
private JLabel mGracePeriodLabel;
private JTextField mGracePeriod;
private JLabel mGracePeriodMinLabel;
+ private JLabel mNextAsThisUpdateExtensionLabel;
+ private JTextField mNextAsThisUpdateExtension;
+ private JLabel mNextAsThisUpdateExtensionMinLabel;
private Color mActiveColor;
private AdminConnection _admin;
@@ -279,6 +282,31 @@ public class CMSCRLSettingPanel extends CMSBaseTab {
gbc.insets = new Insets(COMPONENT_SPACE,COMPONENT_SPACE,0,COMPONENT_SPACE);
freqPanel.add(mGracePeriodMinLabel, gbc);
+ // next update as this update extension
+ CMSAdminUtil.resetGBC(gbc);
+ mNextAsThisUpdateExtensionLabel = makeJLabel("NEXTASTHISEXTENSION");
+ gbc.anchor = gbc.WEST;
+ gbc.fill = gbc.NONE;
+ gbc.gridx = 0;
+ // gbc.gridx = 2;
+ gbc.weightx = 0.0;
+ gbc.gridwidth = 1;
+ gbc.insets = new Insets(COMPONENT_SPACE,DIFFERENT_COMPONENT_SPACE,0,0);
+ freqPanel.add(mNextAsThisUpdateExtensionLabel, gbc);
+
+ mNextAsThisUpdateExtension = makeJTextField(5);
+ gbc.anchor = gbc.WEST;
+ gbc.gridx++;
+ gbc.insets = new Insets(COMPONENT_SPACE,COMPONENT_SPACE,0,0);
+ freqPanel.add(mNextAsThisUpdateExtension, gbc);
+
+ mNextAsThisUpdateExtensionMinLabel = makeJLabel("MINUTES");
+ gbc.anchor = gbc.WEST;
+ gbc.gridx++;
+ gbc.weightx = 1.0;
+ gbc.gridwidth = gbc.REMAINDER;
+ gbc.insets = new Insets(COMPONENT_SPACE,COMPONENT_SPACE,0,COMPONENT_SPACE);
+ freqPanel.add(mNextAsThisUpdateExtensionMinLabel, gbc);
refresh();
}
@@ -295,6 +323,7 @@ public class CMSCRLSettingPanel extends CMSBaseTab {
nvps.put(Constants.PR_ENABLE_FREQ, "");
nvps.put(Constants.PR_UPDATE_FREQ, "");
nvps.put(Constants.PR_GRACE_PERIOD, "");
+ nvps.put(Constants.PR_NEXT_AS_THIS_EXTENSION, "");
try {
NameValuePairs val = null;
@@ -339,6 +368,8 @@ public class CMSCRLSettingPanel extends CMSBaseTab {
mFrequency.setText(value);
} else if (name.equals(Constants.PR_GRACE_PERIOD)) {
mGracePeriod.setText(value);
+ } else if (name.equals(Constants.PR_NEXT_AS_THIS_EXTENSION)) {
+ mNextAsThisUpdateExtension.setText(value);
}
}
}
@@ -527,6 +558,21 @@ public class CMSCRLSettingPanel extends CMSBaseTab {
showMessageDialog("GRACENUMBER");
return false;
}
+
+ if (mNextAsThisUpdateExtension.getText().trim().equals("")) {
+ showMessageDialog("BLANKNEXTASTHISEXTENSION");
+ return false;
+ }
+ try {
+ int nextAsThisUpdateExtension = Integer.parseInt(mNextAsThisUpdateExtension.getText().trim());
+ if (nextAsThisUpdateExtension < 0) {
+ showMessageDialog("NEXTASTHISEXTENSIONNUMBER");
+ return false;
+ }
+ } catch (NumberFormatException e) {
+ showMessageDialog("NEXTASTHISEXTENSIONNUMBER");
+ return false;
+ }
}
NameValuePairs nvps = new NameValuePairs();
@@ -568,6 +614,7 @@ public class CMSCRLSettingPanel extends CMSBaseTab {
nvps.put(Constants.PR_GRACE_PERIOD, mGracePeriod.getText().trim());
+ nvps.put(Constants.PR_NEXT_AS_THIS_EXTENSION, mNextAsThisUpdateExtension.getText().trim());
_model.progressStart();
@@ -614,6 +661,11 @@ public class CMSCRLSettingPanel extends CMSBaseTab {
CMSAdminUtil.repaintComp(mGracePeriodLabel);
mGracePeriodMinLabel.setEnabled(true);
CMSAdminUtil.repaintComp(mGracePeriodMinLabel);
+ CMSAdminUtil.enableJTextField(mNextAsThisUpdateExtension, true, mActiveColor);
+ mNextAsThisUpdateExtensionLabel.setEnabled(true);
+ CMSAdminUtil.repaintComp(mNextAsThisUpdateExtensionLabel);
+ mNextAsThisUpdateExtensionMinLabel.setEnabled(true);
+ CMSAdminUtil.repaintComp(mNextAsThisUpdateExtensionMinLabel);
} else {
CMSAdminUtil.enableJTextField(mDailyAt, false, getBackground());
if (!mEnableFreq.isSelected()) {
@@ -622,6 +674,11 @@ public class CMSCRLSettingPanel extends CMSBaseTab {
CMSAdminUtil.repaintComp(mGracePeriodLabel);
mGracePeriodMinLabel.setEnabled(false);
CMSAdminUtil.repaintComp(mGracePeriodMinLabel);
+ CMSAdminUtil.enableJTextField(mNextAsThisUpdateExtension, false, getBackground());
+ mNextAsThisUpdateExtensionLabel.setEnabled(false);
+ CMSAdminUtil.repaintComp(mNextAsThisUpdateExtensionLabel);
+ mNextAsThisUpdateExtensionMinLabel.setEnabled(false);
+ CMSAdminUtil.repaintComp(mNextAsThisUpdateExtensionMinLabel);
}
}
}
@@ -635,6 +692,11 @@ public class CMSCRLSettingPanel extends CMSBaseTab {
CMSAdminUtil.repaintComp(mGracePeriodLabel);
mGracePeriodMinLabel.setEnabled(true);
CMSAdminUtil.repaintComp(mGracePeriodMinLabel);
+ CMSAdminUtil.enableJTextField(mNextAsThisUpdateExtension, true, mActiveColor);
+ mNextAsThisUpdateExtensionLabel.setEnabled(true);
+ CMSAdminUtil.repaintComp(mNextAsThisUpdateExtensionLabel);
+ mNextAsThisUpdateExtensionMinLabel.setEnabled(true);
+ CMSAdminUtil.repaintComp(mNextAsThisUpdateExtensionMinLabel);
} else {
CMSAdminUtil.enableJTextField(mFrequency, false, getBackground());
mMinLabel.setEnabled(false);
@@ -645,6 +707,11 @@ public class CMSCRLSettingPanel extends CMSBaseTab {
CMSAdminUtil.repaintComp(mGracePeriodLabel);
mGracePeriodMinLabel.setEnabled(false);
CMSAdminUtil.repaintComp(mGracePeriodMinLabel);
+ CMSAdminUtil.enableJTextField(mNextAsThisUpdateExtension, false, getBackground());
+ mNextAsThisUpdateExtensionLabel.setEnabled(false);
+ CMSAdminUtil.repaintComp(mNextAsThisUpdateExtensionLabel);
+ mNextAsThisUpdateExtensionMinLabel.setEnabled(false);
+ CMSAdminUtil.repaintComp(mNextAsThisUpdateExtensionMinLabel);
}
}
}
@@ -693,6 +760,11 @@ public class CMSCRLSettingPanel extends CMSBaseTab {
CMSAdminUtil.repaintComp(mGracePeriodLabel);
mGracePeriodMinLabel.setEnabled(enable3);
CMSAdminUtil.repaintComp(mGracePeriodMinLabel);
+ CMSAdminUtil.enableJTextField(mNextAsThisUpdateExtension, enable3, color3);
+ mNextAsThisUpdateExtensionLabel.setEnabled(enable3);
+ CMSAdminUtil.repaintComp(mNextAsThisUpdateExtensionLabel);
+ mNextAsThisUpdateExtensionMinLabel.setEnabled(enable3);
+ CMSAdminUtil.repaintComp(mNextAsThisUpdateExtensionMinLabel);
}
}
diff --git a/dogtag/console-ui/src/CMSAdminRS.properties b/dogtag/console-ui/src/CMSAdminRS.properties
index 4cf156b7a..1ac6eb176 100644
--- a/dogtag/console-ui/src/CMSAdminRS.properties
+++ b/dogtag/console-ui/src/CMSAdminRS.properties
@@ -604,6 +604,7 @@ CRLSETTING_LABEL_DELTAS_LABEL=delta(s).
CRLSETTING_LABEL_NEXTTIME_LABEL=Extend next update time in full CRLs
CRLSETTING_LABEL_MINUTES_LABEL=minutes
CRLSETTING_LABEL_GRACEPERIOD_LABEL=Next update grace period
+CRLSETTING_LABEL_NEXTASTHISEXTENSION_LABEL=Next update as this update extension
CRLSETTING_DIALOG_UPDATES_TITLE=Error
CRLSETTING_DIALOG_UPDATES_MESSAGE=You are required to select at least one form of CRL updates.
CRLSETTING_DIALOG_BLANKSCHEMA_TITLE=Error
@@ -624,6 +625,10 @@ CRLSETTING_DIALOG_BLANKGRACE_TITLE=Error
CRLSETTING_DIALOG_BLANKGRACE_MESSAGE=Grace period must be specified!
CRLSETTING_DIALOG_GRACENUMBER_TITLE=Number Format Error
CRLSETTING_DIALOG_GRACENUMBER_MESSAGE=Grace period must be a positive integer!
+CRLSETTING_DIALOG_BLANKNEXTASTHISEXTENSION_TITLE=Error
+CRLSETTING_DIALOG_BLANKNEXTASTHISEXTENSION_MESSAGE=Grace period must be specified!
+CRLSETTING_DIALOG_NEXTASTHISEXTENSIONNUMBER_TITLE=Number Format Error
+CRLSETTING_DIALOG_NEXTASTHISEXTENSIONNUMBER_MESSAGE=This update extension must be a positive integer!
CRLCACHE_TITLE=Cache
CRLCACHE_BORDER_CACHE_LABEL=CRL Cache
CRLCACHE_LABEL_CACHE_LABEL=Enable CRL cache: