Commit 9084a00a authored by Micha Mueller's avatar Micha Mueller
Browse files

Fix collectagent. Should now run with new RestAPI

parent dd0a1098
......@@ -515,7 +515,7 @@ int main(int argc, char* const argv[]) {
* Start the HTTP Server for the REST API
*/
CARestAPI httpsServer(restAPISettings, &mySensorCache, analyticsController);
config->readRestAPIUsers(&httpsServer);
config.readRestAPIUsers(&httpsServer);
httpsServer.start();
LOG(info) << "HTTP Server running...";
......
......@@ -14,6 +14,20 @@ global {
restAPI {
address 127.0.0.1:8080
certificate ../../deps/openssl-1.0.2l/certs/demo/ca-cert.pem
privateKey ../../deps/openssl-1.0.2l/certs/demo/ca-cert.pem
dhFile ../../deps/openssl-1.0.2l/crypto/dh/dh2048.pem
user admin {
password admin
PUT
GET
}
user asdf {
password qwertz
GET
}
}
cassandra {
......
......@@ -61,6 +61,7 @@ RESTHttpsServer::RESTHttpsServer(serverSettings_t settings) :
});
*/
//TODO make more robust if certificate not found
_ctx->use_certificate_chain_file(settings.certificate);
_ctx->use_private_key_file(settings.privateKey, ssl::context::pem);
_ctx->use_tmp_dh_file(settings.dhFile);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment