0001-More-verbose-log-warnings-if-ssl-certificate-is-inva.patch
| src/core/sslserver.cpp | ||
|---|---|---|
| 25 | 25 |
#endif |
| 26 | 26 | |
| 27 | 27 |
#include <QFile> |
| 28 |
#include <QDateTime> |
|
| 28 | 29 | |
| 29 | 30 |
#include "logger.h" |
| 30 | 31 |
#include "quassel.h" |
| ... | ... | |
| 101 | 102 |
return false; |
| 102 | 103 |
} |
| 103 | 104 |
if(!_cert.isValid()) {
|
| 104 |
quWarning() << "SslServer: Invalid certificate"; |
|
| 105 |
const QDateTime currentTime = QDateTime::currentDateTime(); |
|
| 106 | ||
| 107 |
if (currentTime > _cert.expiryDate()) {
|
|
| 108 |
quWarning() << "SslServer: certificate expired"; |
|
| 109 |
return false; |
|
| 110 |
} |
|
| 111 |
if (currentTime < _cert.effectiveDate()) {
|
|
| 112 |
quWarning() << "SslServer: certificate is not valid yet"; |
|
| 113 |
return false; |
|
| 114 |
} |
|
| 115 |
quWarning() << "SslServer: Invalid certificate (unknown reason)"; |
|
| 105 | 116 |
return false; |
| 106 | 117 |
} |
| 107 | 118 |
if(_key.isNull()) {
|
| 108 |
- |
|