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

Remove now superfluous P15Card::appKeyFingerprint()

GnuPG-bug-id: 4876
parent 21957820
Pipeline #62376 canceled with stage
......@@ -9,9 +9,6 @@
#include "p15card.h"
#include "kleopatra_debug.h"
using namespace Kleo;
using namespace Kleo::SmartCard;
// static
......@@ -22,8 +19,3 @@ P15Card::P15Card(const Card &card)
{
setAppName(AppName);
}
std::string P15Card::appKeyFingerprint(const std::string &appKeyRef) const
{
return cardInfo("KLEO-FPR-" + appKeyRef);
}
......@@ -14,6 +14,7 @@ namespace Kleo
{
namespace SmartCard
{
/** Class to work with PKCS#15 smartcards or compatible tokens.
*
* A PKCS#15 card is pretty generic and there is no real standard
......@@ -30,13 +31,7 @@ public:
explicit P15Card(const Card &card);
static const std::string AppName;
/* Obtain an application specific fingerprint for a key
* stored on this card.
* e.g. An App Key Ref would be
* OpenPGPCard::pgpSigKeyRef */
std::string appKeyFingerprint(const std::string &appKeyRef) const;
};
} // namespace Smartcard
} // namespace Kleopatra
}
}
......@@ -184,7 +184,7 @@ void P15CardWidget::setCard(const P15Card *card)
const auto key = KeyCache::instance()->findSubkeyByKeyGrip(sigInfo.grip, GpgME::OpenPGP).parent();
if (key.isNull()) {
qCDebug(KLEOPATRA_LOG) << "Failed to find key for grip:" << sigInfo.grip.c_str();
const auto pgpSigFpr = card->appKeyFingerprint(OpenPGPCard::pgpSigKeyRef());
const auto pgpSigFpr = card->keyFingerprint(OpenPGPCard::pgpSigKeyRef());
if (!pgpSigFpr.empty()) {
qCDebug(KLEOPATRA_LOG) << "Should be pgp key:" << pgpSigFpr.c_str();
searchPGPFpr(pgpSigFpr);
......@@ -194,9 +194,9 @@ void P15CardWidget::setCard(const P15Card *card)
}
}
std::string keyid = card->appKeyFingerprint(OpenPGPCard::pgpSigKeyRef());
std::string keyid = card->keyFingerprint(OpenPGPCard::pgpSigKeyRef());
updateSigKeyWidgets(keyid);
keyid = card->appKeyFingerprint(OpenPGPCard::pgpEncKeyRef());
keyid = card->keyFingerprint(OpenPGPCard::pgpEncKeyRef());
if (!keyid.empty()) {
mEncFprLabel->setText(i18n("Encryption key:") +
QStringLiteral(" %1 (%2)")
......
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