projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
c45d822
)
Basic checks on path in SslServer::setCertificate.
author
Joshua T Corbin
<jcorbin@wunjo.org>
Thu, 8 Jan 2009 23:52:55 +0000
(18:52 -0500)
committer
Manuel Nickschas
<sputnick@quassel-irc.org>
Fri, 16 Jan 2009 19:47:10 +0000
(20:47 +0100)
src/core/sslserver.cpp
patch
|
blob
|
history
diff --git
a/src/core/sslserver.cpp
b/src/core/sslserver.cpp
index
570957d
..
53660f8
100644
(file)
--- a/
src/core/sslserver.cpp
+++ b/
src/core/sslserver.cpp
@@
-62,7
+62,16
@@
void SslServer::incomingConnection(int socketDescriptor) {
bool SslServer::setCertificate(const QString &path) {
_certIsValid = false;
+ if (path.isNull()) {
+ return false;
+ }
+
QFile certFile(path);
+ if (! certFile.exists()) {
+ qWarning() << "SslServer: Certificate file" << qPrintable(path) << "does not exist";
+ return false;
+ }
+
certFile.open(QIODevice::ReadOnly);
_cert = QSslCertificate(&certFile);
certFile.close();