Code improvements.

This commit is contained in:
Ravin
2019-11-07 07:47:33 +05:30
committed by Ravin Perera
parent d16b43406b
commit 8d31075b7b
27 changed files with 155 additions and 171 deletions

View File

@@ -117,8 +117,8 @@ void set_contract_dir_paths(std::string basedir)
ctx.contractDir = basedir;
ctx.configDir = basedir + "/cfg";
ctx.configFile = ctx.configDir + "/hp.cfg";
ctx.tlsKeyFile = ctx.configDir + "/key.pem";
ctx.tlsCertFile = ctx.configDir + "/cert.pem";
ctx.tlsKeyFile = ctx.configDir + "/tlskey.pem";
ctx.tlsCertFile = ctx.configDir + "/tlscert.pem";
ctx.histDir = basedir + "/hist";
ctx.stateDir = basedir + "/state";
ctx.logDir = basedir + "/log";
@@ -459,7 +459,7 @@ int validate_contract_dir_paths()
if (path == ctx.tlsKeyFile || path == ctx.tlsCertFile)
{
std::cout << path << " does not exist. Please provide self-signed certificates. Can generate using command\n"
<< "openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem\n"
<< "openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout tlskey.pem -out tlscert.pem\n"
<< "and add it to " + ctx.configDir << std::endl;
}
else