diff --git a/src/commands.hxx b/src/commands.hxx index 1f3185c..fa6ec2f 100644 --- a/src/commands.hxx +++ b/src/commands.hxx @@ -1421,7 +1421,8 @@ class Certificate: public Command { Logger log(this, script); QString filename(script->replacevars(_filename)); QFile cacertfile(filename); - if (!cacertfile.exists()) throw FileNotFound(filename); + if (!cacertfile.exists() || !cacertfile.open(QIODevice::ReadOnly)) + throw FileNotFound(filename); QSslCertificate cacert(&cacertfile); if (cacert.isNull()) throw NotACertificate(filename); QSslSocket::addDefaultCaCertificate(cacert);