[teiid-commits] teiid SVN: r1182 - in trunk: runtime/src/main/java/com/metamatrix/dqp/embedded/services and 1 other directory.
teiid-commits at lists.jboss.org
teiid-commits at lists.jboss.org
Fri Jul 24 11:01:36 EDT 2009
Author: shawkins
Date: 2009-07-24 11:01:35 -0400 (Fri, 24 Jul 2009)
New Revision: 1182
Modified:
trunk/common-core/src/main/java/com/metamatrix/common/util/crypto/CryptoUtil.java
trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
Log:
TEIID-729 allowing for default initialization to the null cryptor if the key cannot be found
Modified: trunk/common-core/src/main/java/com/metamatrix/common/util/crypto/CryptoUtil.java
===================================================================
--- trunk/common-core/src/main/java/com/metamatrix/common/util/crypto/CryptoUtil.java 2009-07-23 21:56:54 UTC (rev 1181)
+++ trunk/common-core/src/main/java/com/metamatrix/common/util/crypto/CryptoUtil.java 2009-07-24 15:01:35 UTC (rev 1182)
@@ -282,7 +282,7 @@
if (CRYPTOR == null) {
// If encryption is not enabled then do nothing.
- if (!isEncryptionEnabled()) {
+ if (!isEncryptionEnabled() || keyResource == null) {
CRYPTOR = new NullCryptor();
return;
}
Modified: trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java
===================================================================
--- trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java 2009-07-23 21:56:54 UTC (rev 1181)
+++ trunk/runtime/src/main/java/com/metamatrix/dqp/embedded/services/EmbeddedConfigurationService.java 2009-07-24 15:01:35 UTC (rev 1182)
@@ -958,9 +958,6 @@
DQPEmbeddedPlugin.logInfo("EmbeddedConfigurationService.dqp_loading", new Object[] {getProcessName()}); //$NON-NLS-1$
- // initialize encryption
- initializeEncryption();
-
// load the configuration file.
this.configurationModel = getSystemConfiguration();
ServerConfigFileReader configReader = loadServerConfigFile();
@@ -1188,29 +1185,6 @@
throw new MetaMatrixRuntimeException("bad configuration"); //$NON-NLS-1$
}
- void initializeEncryption() throws ApplicationInitializationException {
- try {
- URL keyStoreFile = getEncryptionKeyStore();
- if (keyStoreFile != null) {
- CryptoUtil.init(keyStoreFile);
- }
- DQPEmbeddedPlugin.logInfo("EmbeddedConfigurationService.init_encryption", new Object[] {}); //$NON-NLS-1$
- } catch (CryptoException ex) {
- throw new ApplicationInitializationException(ex);
- }
- }
-
- /**
- * @see com.metamatrix.dqp.service.ConfigurationService#getEncryptionKeyStore()
- */
- public URL getEncryptionKeyStore() {
- String keyStoreFile = getUserPreferences().getProperty(DQPEmbeddedProperties.DQP_KEYSTORE);
- if (valid(keyStoreFile)) {
- return getFullyQualifiedPath(keyStoreFile);
- }
- return null;
- }
-
/**
* @see com.metamatrix.dqp.service.ConfigurationService#getConnectionListener()
* @since 4.3.2
More information about the teiid-commits
mailing list