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

Require secret key only for signing key

The secret key is not needed for encryption. Not requiring a secret key
for encryption allows selecting a key where the secret key is stored
on a different computer.
parent e6f6b75d
...@@ -205,10 +205,10 @@ void KeySelectionCombo::init() ...@@ -205,10 +205,10 @@ void KeySelectionCombo::init()
keyFilter->setIsOpenPGP(mProtocol == GpgME::OpenPGP ? Kleo::DefaultKeyFilter::Set : Kleo::DefaultKeyFilter::NotSet); keyFilter->setIsOpenPGP(mProtocol == GpgME::OpenPGP ? Kleo::DefaultKeyFilter::Set : Kleo::DefaultKeyFilter::NotSet);
if (mKeyType == SigningKey) { if (mKeyType == SigningKey) {
keyFilter->setCanSign(Kleo::DefaultKeyFilter::Set); keyFilter->setCanSign(Kleo::DefaultKeyFilter::Set);
keyFilter->setHasSecret(Kleo::DefaultKeyFilter::Set);
} else { } else {
keyFilter->setCanEncrypt(Kleo::DefaultKeyFilter::Set); keyFilter->setCanEncrypt(Kleo::DefaultKeyFilter::Set);
} }
keyFilter->setHasSecret(Kleo::DefaultKeyFilter::Set);
setKeyFilter(keyFilter); setKeyFilter(keyFilter);
prependCustomItem(QIcon(), i18n("No key"), QStringLiteral("no-key")); prependCustomItem(QIcon(), i18n("No key"), QStringLiteral("no-key"));
if (mProtocol == GpgME::OpenPGP) { if (mProtocol == GpgME::OpenPGP) {
......
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