diff options
author | vakwetu <vakwetu@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2010-09-15 16:42:56 +0000 |
---|---|---|
committer | vakwetu <vakwetu@c9f7a03b-bd48-0410-a16d-cbbf54688b0b> | 2010-09-15 16:42:56 +0000 |
commit | 2daf8672f4b55b2a06bcd89041d4ab48691261e5 (patch) | |
tree | da8852fae16fc81bdecce03f38e6fd17c69cd040 /pki/base/kra/src/com | |
parent | ae73bc8273fd1bb9f4d10a06545a19947f91e485 (diff) | |
download | pki-2daf8672f4b55b2a06bcd89041d4ab48691261e5.tar.gz pki-2daf8672f4b55b2a06bcd89041d4ab48691261e5.tar.xz pki-2daf8672f4b55b2a06bcd89041d4ab48691261e5.zip |
Bugzilla Bug 607380 - CC: Make sure Java Console can configure all security relevant config items
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@1295 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/kra/src/com')
-rw-r--r-- | pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java | 17 | ||||
-rw-r--r-- | pki/base/kra/src/com/netscape/kra/StorageKeyUnit.java | 4 |
2 files changed, 20 insertions, 1 deletions
diff --git a/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java b/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java index 857aa414..44fec8f3 100644 --- a/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java +++ b/pki/base/kra/src/com/netscape/kra/KeyRecoveryAuthority.java @@ -538,7 +538,7 @@ public class KeyRecoveryAuthority implements IAuthority, IKeyService, IKeyRecove * @exception EBaseException failed to retrieve info */ public int getNoOfRequiredAgents() throws EBaseException { - if (mConfig.getBoolean("keySplitting")) { + if (mConfig.getBoolean("keySplitting", false)) { return mStorageKeyUnit.getNoOfRequiredAgents(); } else { int ret = -1; @@ -551,6 +551,21 @@ public class KeyRecoveryAuthority implements IAuthority, IKeyService, IKeyRecove } /** + * Sets number of required agents for + * recovery operation + * + * @return none + * @exception EBaseException invalid setting + */ + public void setNoOfRequiredAgents(int number) throws EBaseException { + if (mConfig.getBoolean("keySplitting")) { + mStorageKeyUnit.setNoOfRequiredAgents(number); + } else { + mConfig.putInteger("noOfRequiredRecoveryAgents", number); + } + } + + /** * Distributed recovery. */ public String getRecoveryID() { diff --git a/pki/base/kra/src/com/netscape/kra/StorageKeyUnit.java b/pki/base/kra/src/com/netscape/kra/StorageKeyUnit.java index c3693823..fff1eea7 100644 --- a/pki/base/kra/src/com/netscape/kra/StorageKeyUnit.java +++ b/pki/base/kra/src/com/netscape/kra/StorageKeyUnit.java @@ -636,6 +636,10 @@ public class StorageKeyUnit extends EncryptionUnit implements return mStorageConfig.getInteger(PROP_M); } + public void setNoOfRequiredAgents(int number) { + mStorageConfig.putInteger(PROP_M, number); + } + public CryptoToken getInternalToken() { try { return CryptoManager.getInstance().getInternalKeyStorageToken(); |