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:
4faeafb
)
Catch and describe IO errors in SslServer::setCertificate.
author
Joshua T Corbin
<jcorbin@wunjo.org>
Thu, 8 Jan 2009 23:52:57 +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
7fee3ca
..
8006ebd
100644
(file)
--- a/
src/core/sslserver.cpp
+++ b/
src/core/sslserver.cpp
@@
-72,10
+72,19
@@
bool SslServer::setCertificate(const QString &path) {
return false;
}
- certFile.open(QIODevice::ReadOnly);
+ if (! certFile.open(QIODevice::ReadOnly)) {
+ qWarning()
+ << "SslServer: Failed to open certificate file" << qPrintable(path)
+ << "error:" << certFile.error();
+ return false;
+ }
_cert = QSslCertificate(&certFile);
- certFile.reset();
+ if (! certFile.reset()) {
+ qWarning() << "SslServer: IO error reading certificate file";
+ return false;
+ }
+
_key = QSslKey(&certFile, QSsl::Rsa);
certFile.close();