diff options
author | Christina Fu <cfu@redhat.com> | 2015-10-26 18:35:34 +0100 |
---|---|---|
committer | Christina Fu <cfu@redhat.com> | 2015-10-27 11:05:26 -0700 |
commit | 74197061be89f650f6bc10f0887ab1c87470272e (patch) | |
tree | 4464fb6af18dd656a01030217df16d581bc8845f /base/tps/src/org/dogtagpki/server/tps/processor/TPSProcessor.java | |
parent | 6a1fe2487d550d67ba7c816cb1c6a1b04e1546eb (diff) | |
download | pki-74197061be89f650f6bc10f0887ab1c87470272e.tar.gz pki-74197061be89f650f6bc10f0887ab1c87470272e.tar.xz pki-74197061be89f650f6bc10f0887ab1c87470272e.zip |
Ticket #1527 TPS connector always goes to "ca1"
Diffstat (limited to 'base/tps/src/org/dogtagpki/server/tps/processor/TPSProcessor.java')
-rw-r--r-- | base/tps/src/org/dogtagpki/server/tps/processor/TPSProcessor.java | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/base/tps/src/org/dogtagpki/server/tps/processor/TPSProcessor.java b/base/tps/src/org/dogtagpki/server/tps/processor/TPSProcessor.java index 4a4f05c50..a9355b9bf 100644 --- a/base/tps/src/org/dogtagpki/server/tps/processor/TPSProcessor.java +++ b/base/tps/src/org/dogtagpki/server/tps/processor/TPSProcessor.java @@ -1344,19 +1344,42 @@ public class TPSProcessor { } protected String getCAConnectorID() throws TPSException { + return getCAConnectorID(null, null); + } + + /* + * @param enrollType "keyGen" or "renewal" + * @param keyType e.g. "authentication", "auth", "encryption", or "signing" + */ + protected String getCAConnectorID(String enrollType, String keyType) + throws TPSException { IConfigStore configStore = CMS.getConfigStore(); String id = null; - - String config = "op." + currentTokenOperation + "." + selectedTokenType + ".ca.conn"; + String config = null; + String method = "TPSProcessor.getCAConnectorID:"; + + if ((keyType != null) && (enrollType != null)) { + config = "op." + currentTokenOperation + "." + + selectedTokenType + "." + + enrollType + "." + + keyType+ + ".ca.conn"; + CMS.debug(method + " finding config: " + config); + } else { + config = "op." + currentTokenOperation + "." + + selectedTokenType + + ".ca.conn"; + CMS.debug(method + " finding config: " + config); + } try { - id = configStore.getString(config, "ca1"); + id = configStore.getString(config); } catch (EBaseException e) { - throw new TPSException("TPSProcessor.getCAConnectorID: Internal error finding config value."); + throw new TPSException(method + " Internal error finding config value:" + config); } - CMS.debug("TPSProcessor.getCAConectorID: returning: " + id); + CMS.debug(method + " returning: " + id); return id; } |