summaryrefslogtreecommitdiffstats
path: root/base/server/cms/src
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2017-01-21 00:58:28 +0100
committerEndi S. Dewata <edewata@redhat.com>2017-01-21 03:26:55 +0100
commit5e39d36196f06ebaa8dcf943ec4c19bcbb9c25b0 (patch)
tree78a2af00949483088ca2c86a689cec9ce406d53d /base/server/cms/src
parent6ba7d68c7474e5000c6fbdc4d6cd97d0b291033b (diff)
downloadpki-5e39d36196f06ebaa8dcf943ec4c19bcbb9c25b0.tar.gz
pki-5e39d36196f06ebaa8dcf943ec4c19bcbb9c25b0.tar.xz
pki-5e39d36196f06ebaa8dcf943ec4c19bcbb9c25b0.zip
Refactored ConfigurationRequest.TOKEN_DEFAULT.
The ConfigurationRequest.TOKEN_DEFAULT has been replaced with CryptoUtil.INTERNAL_TOKEN_FULL_NAME since they are identical. https://fedorahosted.org/pki/ticket/2556
Diffstat (limited to 'base/server/cms/src')
-rw-r--r--base/server/cms/src/org/dogtagpki/server/rest/SystemConfigService.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/base/server/cms/src/org/dogtagpki/server/rest/SystemConfigService.java b/base/server/cms/src/org/dogtagpki/server/rest/SystemConfigService.java
index 40f4b5834..963df4d05 100644
--- a/base/server/cms/src/org/dogtagpki/server/rest/SystemConfigService.java
+++ b/base/server/cms/src/org/dogtagpki/server/rest/SystemConfigService.java
@@ -151,7 +151,7 @@ public class SystemConfigService extends PKIService implements SystemConfigResou
CMS.debug("=== Token Authentication ===");
String token = data.getToken();
if (token == null) {
- token = ConfigurationRequest.TOKEN_DEFAULT;
+ token = CryptoUtil.INTERNAL_TOKEN_FULL_NAME;
}
loginToken(data, token);
@@ -877,7 +877,7 @@ public class SystemConfigService extends PKIService implements SystemConfigResou
CMS.debug("SystemConfigService: get configuration entries from master");
ConfigurationUtils.getConfigEntriesFromMaster();
- if (token.equals(ConfigurationRequest.TOKEN_DEFAULT)) {
+ if (token.equals(CryptoUtil.INTERNAL_TOKEN_FULL_NAME)) {
if (!data.getSystemCertsImported()) {
CMS.debug("SystemConfigService: restore certificates from P12 file");
String p12File = data.getP12File();
@@ -1019,7 +1019,7 @@ public class SystemConfigService extends PKIService implements SystemConfigResou
public void loginToken(ConfigurationRequest data, String token) {
cs.putString("preop.module.token", token);
- if (! token.equals(ConfigurationRequest.TOKEN_DEFAULT)) {
+ if (! token.equals(CryptoUtil.INTERNAL_TOKEN_FULL_NAME)) {
try {
CryptoManager cryptoManager = CryptoManager.getInstance();
CryptoToken ctoken = cryptoManager.getTokenByName(token);
@@ -1130,7 +1130,7 @@ public class SystemConfigService extends PKIService implements SystemConfigResou
throw new BadRequestException("Invalid clone URI: " + cloneUri, e);
}
- if (data.getToken().equals(ConfigurationRequest.TOKEN_DEFAULT)) {
+ if (data.getToken().equals(CryptoUtil.INTERNAL_TOKEN_FULL_NAME)) {
if (!data.getSystemCertsImported()) {
if (data.getP12File() == null) {
throw new BadRequestException("P12 filename not provided");
@@ -1210,7 +1210,7 @@ public class SystemConfigService extends PKIService implements SystemConfigResou
}
if ((data.getBackupKeys() != null) && data.getBackupKeys().equals("true")) {
- if (! data.getToken().equals(ConfigurationRequest.TOKEN_DEFAULT)) {
+ if (! data.getToken().equals(CryptoUtil.INTERNAL_TOKEN_FULL_NAME)) {
throw new BadRequestException("HSMs cannot publish private keys to PKCS #12 files");
}