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

Move getter for key fingerprints from OpenPGPCard to base class Card

This allows retrieving the fingerprints of OpenPGP keys stored on all
cards, e.g. some PKCS#15 cards.

GnuPG-bug-id: 4876
parent 6c08d0a2
......@@ -341,3 +341,8 @@ void Card::updateKeyInfo(const KeyPairInfo& keyPairInfo)
}
mKeyInfos.push_back(keyPairInfo);
}
std::string Card::keyFingerprint(const std::string &keyRef) const
{
return cardInfo("KLEO-FPR-" + keyRef);
}
......@@ -104,6 +104,8 @@ public:
const std::vector<KeyPairInfo> & keyInfos() const;
const KeyPairInfo & keyInfo(const std::string &keyRef) const;
std::string keyFingerprint(const std::string &keyRef) const;
protected:
void setAppName(const std::string &name);
void setInitialKeyInfos(const std::vector<KeyPairInfo> &infos);
......
......@@ -99,11 +99,6 @@ QString OpenPGPCard::keyDisplayName(const std::string &keyRef)
return displayNames.value(keyRef);
}
std::string OpenPGPCard::keyFingerprint(const std::string &keyRef) const
{
return cardInfo("KLEO-FPR-" + keyRef);
}
std::string OpenPGPCard::pubkeyUrl() const
{
return cardInfo("PUBKEY-URL");
......
......@@ -37,8 +37,6 @@ public:
static const std::vector<KeyPairInfo> & supportedKeys();
static QString keyDisplayName(const std::string &keyRef);
std::string keyFingerprint(const std::string &keyRef) const;
std::string pubkeyUrl() const;
};
} // namespace Smartcard
......
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