centralize reading/writing file

This commit is contained in:
loki
2021-06-09 12:04:51 +02:00
parent 9d52174d6b
commit cf77b301bc
4 changed files with 3 additions and 33 deletions
+2 -2
View File
@@ -741,8 +741,8 @@ void start(std::shared_ptr<safe::signal_t> shutdown_event) {
load_state();
}
conf_intern.pkey = http::read_file(config::nvhttp.pkey.c_str());
conf_intern.servercert = http::read_file(config::nvhttp.cert.c_str());
conf_intern.pkey = read_file(config::nvhttp.pkey.c_str());
conf_intern.servercert = read_file(config::nvhttp.cert.c_str());
auto ctx = std::make_shared<boost::asio::ssl::context>(boost::asio::ssl::context::tls);
ctx->use_certificate_chain_file(config::nvhttp.cert);