CLOUDSTACK-5946: Commit 2774b62d64 changed keystore file along with coverity fixes. Use varible name for keystore filename to keep it in sync

This commit is contained in:
Kishan Kavala 2014-07-25 14:07:46 +05:30
parent ad640e2fda
commit c61c636ce8
2 changed files with 4 additions and 2 deletions

View File

@ -43,6 +43,7 @@ import javax.crypto.SecretKey;
import javax.inject.Inject;
import javax.naming.ConfigurationException;
import com.cloud.utils.nio.Link;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.FileUtils;
import org.apache.log4j.Logger;
@ -616,7 +617,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
if (null != confFile) {
confPath = confFile.getParent();
keystorePath = confPath + "/cloud.keystore";
keystorePath = confPath + Link.keystoreFile;
keystoreFile = new File(keystorePath);
}

View File

@ -65,6 +65,7 @@ public class Link {
private boolean _gotFollowingPacket;
private SSLEngine _sslEngine;
public static String keystoreFile = "/cloudmanagementserver.keystore";
public Link(InetSocketAddress addr, NioConnection connection) {
_addr = addr;
@ -417,7 +418,7 @@ public class Link {
final Properties dbProps = DbProperties.getDbProperties();
char[] passphrase = dbProps.getProperty("db.cloud.keyStorePassphrase").toCharArray();
String confPath = confFile.getParent();
String keystorePath = confPath + "/cloud.keystore";
String keystorePath = confPath + keystoreFile;
if (new File(keystorePath).exists()) {
stream = new FileInputStream(keystorePath);
} else {