|
|
@ -1421,7 +1421,8 @@ class Certificate: public Command { |
|
|
|
Logger log(this, script); |
|
|
|
Logger log(this, script); |
|
|
|
QString filename(script->replacevars(_filename)); |
|
|
|
QString filename(script->replacevars(_filename)); |
|
|
|
QFile cacertfile(filename); |
|
|
|
QFile cacertfile(filename); |
|
|
|
if (!cacertfile.exists()) throw FileNotFound(filename); |
|
|
|
if (!cacertfile.exists() || !cacertfile.open(QIODevice::ReadOnly)) |
|
|
|
|
|
|
|
throw FileNotFound(filename); |
|
|
|
QSslCertificate cacert(&cacertfile); |
|
|
|
QSslCertificate cacert(&cacertfile); |
|
|
|
if (cacert.isNull()) throw NotACertificate(filename); |
|
|
|
if (cacert.isNull()) throw NotACertificate(filename); |
|
|
|
QSslSocket::addDefaultCaCertificate(cacert); |
|
|
|
QSslSocket::addDefaultCaCertificate(cacert); |
|
|
|