set( APPLICATION_REV_DOMAIN "com.nextcloud.desktopclient" )
set( APPLICATION_VIRTUALFILE_SUFFIX "nextcloud" CACHE STRING "Virtual file suffix (not including the .)")
set( APPLICATION_OCSP_STAPLING_ENABLED OFF )
+set( APPLICATION_FORBID_BAD_SSL OFF )
set( LINUX_PACKAGE_SHORTNAME "nextcloud" )
set( LINUX_APPLICATION_ID "${APPLICATION_REV_DOMAIN}.${LINUX_PACKAGE_SHORTNAME}")
#cmakedefine APPLICATION_WIZARD_USE_CUSTOM_LOGO "@APPLICATION_WIZARD_USE_CUSTOM_LOGO@"
#cmakedefine APPLICATION_VIRTUALFILE_SUFFIX "@APPLICATION_VIRTUALFILE_SUFFIX@"
#cmakedefine APPLICATION_OCSP_STAPLING_ENABLED "@APPLICATION_OCSP_STAPLING_ENABLED@"
+#cmakedefine APPLICATION_FORBID_BAD_SSL "@APPLICATION_FORBID_BAD_SSL@"
#define APPLICATION_DOTVIRTUALFILE_SUFFIX "." APPLICATION_VIRTUALFILE_SUFFIX
#cmakedefine ZLIB_FOUND @ZLIB_FOUND@
*/
#include "configfile.h"
#include "sslerrordialog.h"
+#include "theme.h"
#include <QtGui>
#include <QtNetwork>
QPushButton *cancelButton =
_ui->_dialogButtonBox->button(QDialogButtonBox::Cancel);
okButton->setEnabled(false);
+
+ _ui->_cbTrustConnect->setEnabled(!Theme::instance()->forbidBadSSL());
connect(_ui->_cbTrustConnect, &QAbstractButton::clicked,
okButton, &QWidget::setEnabled);
msg += QL("<h3>") + tr("Cannot connect securely to <i>%1</i>:").arg(host) + QL("</h3>");
// loop over the unknown certs and line up their errors.
msg += QL("<div id=\"ca_errors\">");
-
foreach (const QSslCertificate &cert, _unknownCerts) {
msg += QL("<div id=\"ca_error\">");
// add the errors for this cert
}
if (!additionalErrorStrings.isEmpty()) {
- msg += QL("<h3>") + tr("Additional errors:") + QL("</h3>");
+ msg += QL("<h4>") + tr("Additional errors:") + QL("</h4>");
for (const auto &errorString : additionalErrorStrings) {
msg += QL("<div id=\"ca_error\">");
#endif
}
+bool Theme::forbidBadSSL() const
+{
+#ifdef APPLICATION_FORBID_BAD_SSL
+ return true;
+#else
+ return false;
+#endif
+}
+
QString Theme::forceConfigAuthType() const
{
return QString();
*/
virtual bool enableStaplingOCSP() const;
+ /**
+ * Enforce SSL validity
+ *
+ * When true, trusting the untrusted certificate is not allowed
+ */
+ virtual bool forbidBadSSL() const;
+
/**
* This is only usefull when previous version had a different overrideServerUrl
* with a different auth type in that case You should then specify "http" or "shibboleth".