Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 39 additions & 17 deletions client/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class MacMenuBar {};
#include <QtNetwork/QNetworkProxy>
#include <QtNetwork/QSslCertificate>
#include <QtNetwork/QSslConfiguration>
#include <QtNetwork/QSslSocket>
#include <QtWidgets/QAccessibleWidget>
#include <QtWidgets/QMessageBox>
#include <QtWidgets/QProgressBar>
Expand Down Expand Up @@ -484,32 +485,53 @@ Application::Application( int &argc, char **argv )
}

QMetaObject::invokeMethod(this, [this] {
auto showSslWarning = [this] {
if(QSslSocket::supportsSsl())
return;
WarningDialog::create()
->withTitle(tr("Secure network support is unavailable"))
->withText(tr("DigiDoc4 Client could not load a compatible TLS library. "
"Mobile-ID, Smart-ID, configuration updates, and other online services may not work. "
"Check for conflicting OpenSSL installations or reinstall ID-software."))
->withDetails(QStringLiteral("Qt (%1)\nOpenSSL build (%2)\nOpenSSL current (%3)")
.arg(QString::fromLatin1(qVersion()), QSslSocket::sslLibraryBuildVersionString(),
QSslSocket::sslLibraryVersionString()))
->open();
};
auto showPluginWarning = [this, showSslWarning] {
#ifdef Q_OS_MAC
if(!Settings::PLUGINS.isSet())
{
auto *dlg = WarningDialog::create()
->withText(tr("In order to authenticate and sign in e-services with an ID-card you need to install the web browser components."))
->setCancelText(tr("Ignore forever"))
->addButton(tr("Remind later"), QMessageBox::Ignore)
->addButton(tr("Install"), QMessageBox::Open);
connect(dlg, &WarningDialog::finished, this, [](int result) {
switch(result)
{
case QMessageBox::Open: QDesktopServices::openUrl(tr("https://www.id.ee/en/article/install-id-software/")); break;
case QMessageBox::Ignore: break;
default: Settings::PLUGINS = QStringLiteral("ignore");
}
});
dlg->open();
}
if(!Settings::PLUGINS.isSet())
{
auto *dlg = WarningDialog::create()
->withText(tr("In order to authenticate and sign in e-services with an ID-card you need to install the web browser components."))
->setCancelText(tr("Ignore forever"))
->addButton(tr("Remind later"), QMessageBox::Ignore)
->addButton(tr("Install"), QMessageBox::Open);
connect(dlg, &WarningDialog::finished, this, [showSslWarning](int result) {
switch(result)
{
case QMessageBox::Open: QDesktopServices::openUrl(tr("https://www.id.ee/en/article/install-id-software/")); break;
case QMessageBox::Ignore: break;
default: Settings::PLUGINS = QStringLiteral("ignore");
}
showSslWarning();
});
dlg->open();
return;
}
#endif
showSslWarning();
};
if(Settings::SHOW_INTRO)
{
Settings::SHOW_INTRO = false;
auto *dlg = new FirstRun(mainWindow());
connect(dlg, &FirstRun::langChanged, this, &Application::loadTranslation);
connect(dlg, &FirstRun::finished, this, showPluginWarning);
dlg->open();
}
else
showPluginWarning();
}, Qt::QueuedConnection);

if( !args.isEmpty() || topLevelWindows().isEmpty() )
Expand Down
10 changes: 10 additions & 0 deletions client/Diagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <QtCore/QJsonObject>
#include <QtCore/QTextStream>
#include <QtNetwork/QSslCertificate>
#include <QtNetwork/QSslSocket>

#include <digidocpp/Conf.h>

Expand All @@ -39,6 +40,15 @@ static QTextStream &operator<<(QTextStream &s, bool result)

void Diagnostics::generalInfo(QTextStream &s)
{
if(!QSslSocket::supportsSsl())
{
s << "<b><font color=\"#AD2A45\">" << Application::tr("Secure network support is unavailable")
<< "</font></b><br />" << Application::tr(
"DigiDoc4 Client could not load a compatible TLS library. "
"Mobile-ID, Smart-ID, configuration updates, and other online services may not work. "
"Check for conflicting OpenSSL installations or reinstall ID-software.")
<< "<br /><br />";
}
s << "<b>" << tr("Arguments:") << "</b> " << Application::arguments().join(' ') << "<br />"
<< "<b>" << tr("Library paths:") << "</b> " << QCoreApplication::libraryPaths().join(';') << "<br />"
<< "<b>" << "URLs:" << "</b>"
Expand Down
8 changes: 8 additions & 0 deletions client/translations/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,14 @@
<source>New Window</source>
<translation>New Window</translation>
</message>
<message>
<source>Secure network support is unavailable</source>
<translation>Secure network support is unavailable</translation>
</message>
<message>
<source>DigiDoc4 Client could not load a compatible TLS library. Mobile-ID, Smart-ID, configuration updates, and other online services may not work. Check for conflicting OpenSSL installations or reinstall ID-software.</source>
<translation>DigiDoc4 Client could not load a compatible TLS library. Mobile-ID, Smart-ID, configuration updates, and other online services may not work. Check for conflicting OpenSSL installations or reinstall ID-software.</translation>
</message>
<message>
<source>In order to authenticate and sign in e-services with an ID-card you need to install the web browser components.</source>
<translation>In order to authenticate and sign in e-services with an ID-card you need to install the web browser components.</translation>
Expand Down
8 changes: 8 additions & 0 deletions client/translations/et.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,14 @@
<source>New Window</source>
<translation>Ava uus aken</translation>
</message>
<message>
<source>Secure network support is unavailable</source>
<translation>Turvaline võrguühendus pole saadaval</translation>
</message>
<message>
<source>DigiDoc4 Client could not load a compatible TLS library. Mobile-ID, Smart-ID, configuration updates, and other online services may not work. Check for conflicting OpenSSL installations or reinstall ID-software.</source>
<translation>DigiDoc4 Client ei saanud ühilduvat TLS-teeki laadida. Mobiil-ID, Smart-ID, konfiguratsiooni uuendamine ja muud võrguteenused ei pruugi töötada. Kontrolli vastuolulisi OpenSSL-i paigaldusi või paigalda ID-tarkvara uuesti.</translation>
</message>
<message>
<source>In order to authenticate and sign in e-services with an ID-card you need to install the web browser components.</source>
<translation>ID-kaardiga e-teenustes autentimiseks ja allkirjastamiseks on vajalik paigaldada ka veebilehitseja komponendid.</translation>
Expand Down
Loading