summaryrefslogtreecommitdiffstats
path: root/src/uscxml/server/HTTPServer.cpp
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2017-05-30 19:48:04 (GMT)
committerStefan Radomski <github@mintwerk.de>2017-05-30 19:48:04 (GMT)
commitd6cf6e2f11e0055707ec810928d75e82d9ed9ec2 (patch)
tree2850b9fe12d923a3fab94e97f0bdcafacc4a9db1 /src/uscxml/server/HTTPServer.cpp
parentca31d356e44e19649eeb8340eb1451ea3f477cfa (diff)
downloaduscxml-d6cf6e2f11e0055707ec810928d75e82d9ed9ec2.zip
uscxml-d6cf6e2f11e0055707ec810928d75e82d9ed9ec2.tar.gz
uscxml-d6cf6e2f11e0055707ec810928d75e82d9ed9ec2.tar.bz2
Updated libevent version for SSL support
Diffstat (limited to 'src/uscxml/server/HTTPServer.cpp')
-rw-r--r--src/uscxml/server/HTTPServer.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/uscxml/server/HTTPServer.cpp b/src/uscxml/server/HTTPServer.cpp
index b180371..367df21 100644
--- a/src/uscxml/server/HTTPServer.cpp
+++ b/src/uscxml/server/HTTPServer.cpp
@@ -51,7 +51,7 @@ extern "C" {
//#include <arpa/inet.h>
#endif
-#if (defined EVENT_SSL_FOUND && defined LIBEVENT_HAS_BEVCB && defined OPENSSL_FOUND)
+#ifdef HTTPS_ENABLED
extern "C" {
#include <openssl/ssl.h>
#include <openssl/err.h>
@@ -115,7 +115,7 @@ HTTPServer::HTTPServer(unsigned short port, unsigned short wsPort, SSLConfig* ss
}
}
-#if (defined EVENT_SSL_FOUND && defined LIBEVENT_HAS_BEVCB && defined OPENSSL_FOUND)
+#ifdef HTTPS_ENABLED
// have another look here https://github.com/ppelleti/https-example/blob/master/https-server.c
if (!sslConf) {
@@ -223,7 +223,7 @@ HTTPServer* HTTPServer::getInstance(unsigned short port, unsigned short wsPort,
_instance = new HTTPServer(port, wsPort, sslConf);
// only start if we have something to do!
-#if (defined EVENT_SSL_FOUND && defined LIBEVENT_HAS_BEVCB && defined OPENSSL_FOUND && defined OPENSSL_HAS_ELIPTIC_CURVES)
+#ifdef HTTPS_ENABLED
if (_instance->_httpHandle || _instance->_wsHandle || _instance->_sslHandle)
#else
if (_instance->_httpHandle || _instance->_wsHandle)
@@ -297,7 +297,7 @@ void HTTPServer::httpRecvReqCallback(struct evhttp_request *req, void *callbackD
const char* wsConnection = evhttp_find_header(headers, "Connection");
if (wsUpgrade && wsConnection) {
if (iequals(wsUpgrade, "websocket") && iequals(wsConnection, "Upgrade")) {
- // this is a websocket request! .. but we do not know how to decouple form evhttp
+ // this is a websocket request! .. but we do not know how to decouple from evhttp
}
}
#endif
@@ -714,7 +714,7 @@ std::string HTTPServer::getBaseURL(ServerType type) {
case HTTP:
servletURL << "http://" << INSTANCE->_address << ":" << INSTANCE->_port;
break;
-#if (defined EVENT_SSL_FOUND && defined LIBEVENT_HAS_BEVCB && defined OPENSSL_FOUND)
+#ifdef HTTPS_ENABLED
case HTTPS:
servletURL << "https://" << INSTANCE->_address << ":" << INSTANCE->_sslPort;
break;
@@ -748,7 +748,7 @@ void HTTPServer::determineAddress() {
}
-#if (defined EVENT_SSL_FOUND && defined LIBEVENT_HAS_BEVCB && defined OPENSSL_FOUND)
+#ifdef HTTPS_ENABLED
// see https://github.com/ppelleti/https-example/blob/master/https-server.c
struct bufferevent* HTTPServer::sslBufferEventCallback(struct event_base *base, void *arg) {
struct bufferevent* r;