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

Add helper for checking if X.509 directory servers are configured

GnuPG-bug-id: 5672
parent c891fe0a
...@@ -452,6 +452,13 @@ QString Kleo::keyserver() ...@@ -452,6 +452,13 @@ QString Kleo::keyserver()
return result; return result;
} }
bool Kleo::haveX509DirectoryServerConfigured()
{
return !getCryptoConfigUrlList("dirmngr", "ldapserver").empty()
|| !getCryptoConfigUrlList("dirmngr", "LDAP Server").empty()
|| !getCryptoConfigUrlList("gpgsm", "keyserver").empty();
}
bool Kleo::gpgComplianceP(const char *mode) bool Kleo::gpgComplianceP(const char *mode)
{ {
const auto conf = QGpgME::cryptoConfig(); const auto conf = QGpgME::cryptoConfig();
......
...@@ -65,6 +65,11 @@ KLEO_EXPORT bool haveKeyserverConfigured(); ...@@ -65,6 +65,11 @@ KLEO_EXPORT bool haveKeyserverConfigured();
*/ */
KLEO_EXPORT QString keyserver(); KLEO_EXPORT QString keyserver();
/** Returns true, if GnuPG knows which server to use for directory service
* operations for X.509 certificates.
*/
KLEO_EXPORT bool haveX509DirectoryServerConfigured();
/* Use gnupgUsesDeVsCompliance() or gnupgIsDeVsCompliant() instead. */ /* Use gnupgUsesDeVsCompliance() or gnupgIsDeVsCompliant() instead. */
KLEO_DEPRECATED_EXPORT bool gpgComplianceP(const char *mode); KLEO_DEPRECATED_EXPORT bool gpgComplianceP(const char *mode);
......
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