FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Revert "KVM: Enable SSL if keystore exists (#6200)" · weizhouapache/cloudstack@a16b46e · GitHub

Commit a16b46e

Browse files
committed
Revert "KVM: Enable SSL if keystore exists (apache#6200)"
This reverts commit 4525f8c.
1 parent 9b43ad2 commit a16b46e

1 file changed

Lines changed: 0 additions & 23 deletions

File tree

‎agent/src/main/java/com/cloud/agent/AgentShell.java‎

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import com.cloud.utils.backoff.BackoffAlgorithm;
2828
import com.cloud.utils.backoff.impl.ConstantTimeBackoff;
2929
import com.cloud.utils.exception.CloudRuntimeException;
30-
import org.apache.cloudstack.utils.security.KeyStoreUtils;
3130
import org.apache.commons.daemon.Daemon;
3231
import org.apache.commons.daemon.DaemonContext;
3332
import org.apache.commons.daemon.DaemonInitException;
@@ -375,7 +374,6 @@ public void init(String[] args) throws ConfigurationException {
375374

376375
loadProperties();
377376
parseCommand(args);
378-
enableSSL();
379377

380378
if (s_logger.isDebugEnabled()) {
381379
List<String> properties = Collections.list((Enumeration<String>)_properties.propertyNames());
@@ -399,27 +397,6 @@ public void init(String[] args) throws ConfigurationException {
399397
_backoff.configure("ConstantTimeBackoff", new HashMap<String, Object>());
400398
}
401399

402-
private void enableSSL() {
403-
final File agentFile = PropertiesUtil.findConfigFile("agent.properties");
404-
if (agentFile == null) {
405-
s_logger.info("Failed to find agent.properties file");
406-
return;
407-
}
408-
String keystorePass = getProperty(null, "keystore.passphrase");
409-
if (StringUtils.isBlank(keystorePass)) {
410-
s_logger.info("Failed to find passphrase for keystore: " + KeyStoreUtils.KS_FILENAME);
411-
return;
412-
}
413-
final String keyStoreFile = agentFile.getParent() + "/" + KeyStoreUtils.KS_FILENAME;
414-
File f = new File(keyStoreFile);
415-
if (f.exists() && !f.isDirectory()) {
416-
System.setProperty("javax.net.ssl.trustStore", keyStoreFile);
417-
System.setProperty("javax.net.ssl.trustStorePassword", keystorePass);
418-
} else {
419-
s_logger.info("Failed to find keystore file: " + keyStoreFile);
420-
}
421-
}
422-
423400
private void launchAgent() throws ConfigurationException {
424401
String resourceClassNames = getProperty(null, "resource");
425402
s_logger.trace("resource=" + resourceClassNames);

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL