Commit fcbb856d authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Disable configuration of directory services if qgpgme is too old

To prevent the configuration of the directory services to be corrupted
we disable the configuration if (q)gpgme is incompatible with the
extended keyserver spec (with keyserver flags).

GnuPG-bug-id: 5465
parent 64562c70
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <KLineEdit> #include <KLineEdit>
#include <KLocalizedString> #include <KLocalizedString>
#include <KMessageBox>
#include "kleo_ui_debug.h" #include "kleo_ui_debug.h"
#include <utils/formatting.h> #include <utils/formatting.h>
#include <QIcon> #include <QIcon>
...@@ -41,6 +42,8 @@ ...@@ -41,6 +42,8 @@
#include <QComboBox> #include <QComboBox>
#include <QGroupBox> #include <QGroupBox>
#include <gpgme.h>
#include <memory> #include <memory>
#include <limits> #include <limits>
#include <array> #include <array>
...@@ -901,6 +904,14 @@ void prepareURLCfgDialog(QDialog *dialog, DirectoryServicesWidget *dirserv, bool ...@@ -901,6 +904,14 @@ void prepareURLCfgDialog(QDialog *dialog, DirectoryServicesWidget *dirserv, bool
void Kleo::CryptoConfigEntryLDAPURL::slotOpenDialog() void Kleo::CryptoConfigEntryLDAPURL::slotOpenDialog()
{ {
if (!gpgme_check_version("1.15.2")) {
KMessageBox::sorry(mPushButton->parentWidget(),
i18n("Configuration of directory services is not possible "
"because the used gpgme libraries are too old."),
i18n("Sorry"));
return;
}
// I'm a bad boy and I do it all on the stack. Enough classes already :) // I'm a bad boy and I do it all on the stack. Enough classes already :)
// This is just a simple dialog around the directory-services-widget // This is just a simple dialog around the directory-services-widget
QDialog dialog(mPushButton->parentWidget()); QDialog dialog(mPushButton->parentWidget());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment