diff options
author | Saturn&Eric <[email protected]> | 2022-01-05 20:02:19 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2022-01-05 20:02:19 +0000 |
commit | a3ca1bf1d4404327d68d3d49127085638c272152 (patch) | |
tree | deb10c33977e5002fa6e9b434f2b07d2719a4e31 /src/gpg/model/GpgKey.h | |
parent | Merge pull request #37 from saturneric/document (diff) | |
parent | <doc>(navbar): take repository and GitHub apart. (diff) | |
download | GpgFrontend-a3ca1bf1d4404327d68d3d49127085638c272152.tar.gz GpgFrontend-a3ca1bf1d4404327d68d3d49127085638c272152.zip |
Merge pull request #36 from saturneric/developv2.0.4
v2.0.4
Diffstat (limited to 'src/gpg/model/GpgKey.h')
-rw-r--r-- | src/gpg/model/GpgKey.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gpg/model/GpgKey.h b/src/gpg/model/GpgKey.h index fb7d5735..0ce83372 100644 --- a/src/gpg/model/GpgKey.h +++ b/src/gpg/model/GpgKey.h @@ -108,6 +108,13 @@ class GpgKey { [[nodiscard]] bool CanAuthActual() const; + [[nodiscard]] bool HasCardKey() const { + auto subkeys = subKeys(); + return std::any_of( + subkeys->begin(), subkeys->end(), + [](const GpgSubKey& subkey) -> bool { return subkey.is_cardkey(); }); + } + [[nodiscard]] bool is_private_key() const { return _key_ref->secret; } [[nodiscard]] bool expired() const { return _key_ref->expired; } |