projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add core commandline option to require SSL for client connections.
[quassel.git]
/
src
/
core
/
coreauthhandler.cpp
diff --git
a/src/core/coreauthhandler.cpp
b/src/core/coreauthhandler.cpp
index
4b2824f
..
7356d5b
100644
(file)
--- a/
src/core/coreauthhandler.cpp
+++ b/
src/core/coreauthhandler.cpp
@@
-101,6
+101,11
@@
void CoreAuthHandler::handle(const RegisterClient &msg)
// TODO: only in compat mode
bool useSsl = false;
#ifdef HAVE_SSL
// TODO: only in compat mode
bool useSsl = false;
#ifdef HAVE_SSL
+ if (Quassel::isOptionSet("require-ssl") && !msg.sslSupported) {
+ _peer->dispatch(ClientDenied(tr("<b>SSL is required!</b><br>You need to use SSL in order to connect to this core.")));
+ _peer->close();
+ return;
+ }
if (Core::sslSupported() && msg.sslSupported)
useSsl = true;
#endif
if (Core::sslSupported() && msg.sslSupported)
useSsl = true;
#endif