Adds the configure option "--disable-ssl", fixes related errors.
parent
de05a4fe5a
commit
f821332f97
|
@ -216,6 +216,14 @@ AS_IF([test "x$enable_sound" != "xyes"],[
|
|||
AC_DEFINE([WZ_NOSOUND], [], [Causes sound to be disabled])
|
||||
])
|
||||
|
||||
# Disables SSL for the Lobby
|
||||
AC_ARG_ENABLE([ssl],
|
||||
AS_HELP_STRING([--disable-ssl], [Disable SSL [no]]),
|
||||
[ enable_ssl="${enableval}" ], [ enable_ssl="yes" ])
|
||||
AS_IF([test "x$enable_ssl" != "xyes"],[
|
||||
AC_DEFINE([NO_SSL], [], [Causes SSL to be disabled])
|
||||
])
|
||||
|
||||
# -O0 turns off all optimizations; this is necessary for accurate debugging
|
||||
# -Wno-unused-label is necessary because flex produces unused labels that we cannot fix
|
||||
# Add later for stricter checking: -Wextra -Wmissing-declarations -Wstrict-prototypes
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include <QtCore/QFile>
|
||||
|
||||
#include "netlobby.h"
|
||||
#include "lib/framework/frame.h"
|
||||
|
||||
namespace Lobby
|
||||
{
|
||||
|
@ -329,6 +328,10 @@ namespace Lobby
|
|||
|
||||
Client& Client::addCACertificate(const QString& path)
|
||||
{
|
||||
#if defined(NO_SSL)
|
||||
debug(LOG_LOBBY, "Cannot add an SSL Certificate as SSL is not compiled in.");
|
||||
return *this;
|
||||
#else
|
||||
QFile cafile(path);
|
||||
if (!cafile.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||
{
|
||||
|
@ -347,6 +350,7 @@ namespace Lobby
|
|||
cacerts_.append(certificate);
|
||||
|
||||
return *this;
|
||||
#endif
|
||||
}
|
||||
|
||||
RETURN_CODES Client::connect()
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <QtNetwork/QSslSocket>
|
||||
#endif
|
||||
|
||||
#include "lib/framework/frame.h"
|
||||
#include "bson/bson.h"
|
||||
|
||||
namespace Lobby
|
||||
|
@ -172,7 +173,9 @@ namespace Lobby
|
|||
uint32_t callId_;
|
||||
|
||||
bool useSSL_;
|
||||
#if !defined(NO_SSL)
|
||||
QList<QSslCertificate> cacerts_;
|
||||
#endif
|
||||
|
||||
bool useAuth_;
|
||||
QString host_;
|
||||
|
|
Loading…
Reference in New Issue