openpgp: implement public subkeys support

This commit is contained in:
xiphon
2020-06-10 12:41:41 +00:00
parent c8f4355e15
commit ef5d855950
6 changed files with 75 additions and 52 deletions

View File

@@ -69,6 +69,18 @@ public:
return nullptr;
}
template <typename Callback>
void for_each(packet_tag::type type, Callback &callback) const
{
for (const auto &packet : packets)
{
if (packet.first.packet_type == type)
{
callback(packet.second);
}
}
}
private:
std::vector<std::pair<packet_tag, std::vector<uint8_t>>> packets;
};