Added TLS on/off flag for user port.

This commit is contained in:
ravinsp
2020-09-24 11:05:42 +05:30
parent 5bfa722b24
commit ef1a650f91
6 changed files with 57 additions and 42 deletions

View File

@@ -56,7 +56,8 @@ namespace usr
int start_listening()
{
if (ctx.listener.start(
conf::cfg.pubport, ".sock-user", comm::SESSION_TYPE::USER, true, true, metric_thresholds, std::set<conf::ip_port_pair>(), conf::cfg.pubmaxsize) == -1)
conf::cfg.pubport, ".sock-user", comm::SESSION_TYPE::USER,
true, true, conf::cfg.pubtls, metric_thresholds, std::set<conf::ip_port_pair>(), conf::cfg.pubmaxsize) == -1)
return -1;
LOG_INFO << "Started listening for user connections on " << std::to_string(conf::cfg.pubport);
@@ -108,7 +109,7 @@ namespace usr
session.issued_challenge.clear(); // Remove the stored challenge
LOG_DEBUG << "User connection " << session.uniqueid.substr(0, 10) << " authenticated. Public key "
<< userpubkeyhex;
<< userpubkeyhex;
return 0;
}
else