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

Use improved helper from libkleo to check for directory servers

GnuPG-bug-id: 5672
parent 1e45d02a
Pipeline #91931 passed with stage
in 14 minutes and 27 seconds
......@@ -371,19 +371,6 @@ void LookupCertificatesCommand::Private::showResult(QWidget *parent, const KeyLi
QStringLiteral("lookup-certificates-truncated-result"));
}
static bool haveX509DirectoryServerConfigured()
{
const QGpgME::CryptoConfig *const config = QGpgME::cryptoConfig();
if (!config) {
return false;
}
const QGpgME::CryptoConfigEntry *entry = getCryptoConfigEntry(config, "dirmngr", "LDAP Server");
bool entriesExist = entry && !entry->urlValueList().empty();
entry = getCryptoConfigEntry(config, "gpgsm", "keyserver");
entriesExist |= entry && !entry->urlValueList().empty();
return entriesExist;
}
bool LookupCertificatesCommand::Private::checkConfig() const
{
const bool ok = haveKeyserverConfigured() || haveX509DirectoryServerConfigured();
......
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