diff options
Diffstat (limited to 'src/gpg/model/GpgUID.h')
-rw-r--r-- | src/gpg/model/GpgUID.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gpg/model/GpgUID.h b/src/gpg/model/GpgUID.h index 66dba321..8cac4cf7 100644 --- a/src/gpg/model/GpgUID.h +++ b/src/gpg/model/GpgUID.h @@ -26,6 +26,7 @@ #define GPGFRONTEND_GPGUID_H #include "GpgKeySignature.h" +#include "GpgTOFUInfo.h" namespace GpgFrontend { @@ -43,6 +44,16 @@ class GpgUID { [[nodiscard]] bool invalid() const { return _uid_ref->invalid; } + [[nodiscard]] std::unique_ptr<std::vector<GpgTOFUInfo>> tofu_infos() const { + auto infos = std::make_unique<std::vector<GpgTOFUInfo>>(); + auto info_next = _uid_ref->tofu; + while (info_next != nullptr) { + infos->push_back(GpgTOFUInfo(info_next)); + info_next = info_next->next; + } + return infos; + } + [[nodiscard]] std::unique_ptr<std::vector<GpgKeySignature>> signatures() const { auto sigs = std::make_unique<std::vector<GpgKeySignature>>(); |