Unverified Commit e91ee35d authored by Andre Heinecke's avatar Andre Heinecke
Browse files

Add setting to always search for smartcard certs

By default kleopatra only searches on LDAP servers for
certificates belonging to a PKCS#15 smartcards. But
there could also be scenrios where other protocols make
sense. So we now add a default off setting for this.

To implement this also for OpenPGP smartcards we now
have:
GnuPG-Bug-Id: T5735
parent 9f1fb2f8
Pipeline #109723 passed with stage
in 2 minutes and 35 seconds
......@@ -100,4 +100,13 @@
<default>true</default>
</entry>
</group>
<group name="Smartcard">
<entry name="AlwaysSearchCardOnKeyserver" type="Bool">
<label>Always search smartcard certificates on keyserver</label>
<tooltip>Searches for the certificates belonging the smartcard keys on the configured keyserver.</tooltip>
<whatsthis>Searches on keyservers regardless of the protocol for the smartcards key, regardless
of the keyserver protocol. Default behavior is to only do this for LDAP keyservers.</whatsthis>
<default>false</default>
</entry>
</group>
</kcfg>
......@@ -12,6 +12,8 @@
#include "openpgpkeycardwidget.h"
#include "settings.h"
#include "smartcard/p15card.h"
#include "smartcard/openpgpcard.h"
#include "smartcard/readerstatus.h"
......@@ -105,7 +107,7 @@ void P15CardWidget::searchPGPFpr(const std::string &fpr)
/* Only do auto import from LDAP */
auto conf = QGpgME::cryptoConfig();
Q_ASSERT (conf);
if (!Kleo::keyserver().startsWith(QLatin1String{"ldap"})) {
if (!Settings().alwaysSearchCardOnKeyserver() && !Kleo::keyserver().startsWith(QLatin1String{"ldap"})) {
return;
}
mStatusLabel->setText(i18n("Searching in directory service..."));
......
Supports Markdown
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