diff options
| author | Keith Wall <kwall@apache.org> | 2014-08-08 11:16:26 +0000 |
|---|---|---|
| committer | Keith Wall <kwall@apache.org> | 2014-08-08 11:16:26 +0000 |
| commit | bf0089dd71fc9b173f7d8670439672394d73f847 (patch) | |
| tree | 8fbe4892c6b53ea90d1e81c98a72f170906ab96a /qpid/java | |
| parent | 47cf6f6f4239cc85bd14f3f349f615a2eb6304fc (diff) | |
| download | qpid-python-bf0089dd71fc9b173f7d8670439672394d73f847.tar.gz | |
QPID-5976: [Java Broker] The file keystore/truststore objects should not try to validate external file when transitioning to deleted state.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1616716 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
2 files changed, 9 insertions, 0 deletions
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileKeyStoreImpl.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileKeyStoreImpl.java index ac28619d2d..d4aeca0437 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileKeyStoreImpl.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileKeyStoreImpl.java @@ -151,6 +151,10 @@ public class FileKeyStoreImpl extends AbstractConfiguredObject<FileKeyStoreImpl> { super.validateChange(proxyForValidation, changedAttributes); FileKeyStore changedStore = (FileKeyStore) proxyForValidation; + if (changedAttributes.contains(KeyStore.DESIRED_STATE) && changedStore.getDesiredState() == State.DELETED) + { + return; + } if(changedAttributes.contains(NAME) && !getName().equals(changedStore.getName())) { throw new IllegalConfigurationException("Changing the key store name is not allowed"); diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileTrustStoreImpl.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileTrustStoreImpl.java index d71670fbe0..0596c21291 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileTrustStoreImpl.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/security/FileTrustStoreImpl.java @@ -166,7 +166,12 @@ public class FileTrustStoreImpl extends AbstractConfiguredObject<FileTrustStoreI protected void validateChange(final ConfiguredObject<?> proxyForValidation, final Set<String> changedAttributes) { super.validateChange(proxyForValidation, changedAttributes); + FileTrustStore updated = (FileTrustStore) proxyForValidation; + if (changedAttributes.contains(TrustStore.DESIRED_STATE) && updated.getDesiredState() == State.DELETED) + { + return; + } if(changedAttributes.contains(TrustStore.NAME) && !getName().equals(updated.getName())) { throw new IllegalConfigurationException("Changing the trust store name is not allowed"); |
