diff options
author | Saturneric <[email protected]> | 2021-05-24 18:34:02 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2021-05-24 18:34:02 +0000 |
commit | d989b48429ff9e37316d3c5c523e3cf53bbf5907 (patch) | |
tree | 892f187bdc8e493a7278892757da778d81c2432c /src/gpg/GpgKey.cpp | |
parent | Declare and Define getSigners; (diff) | |
download | GpgFrontend-d989b48429ff9e37316d3c5c523e3cf53bbf5907.tar.gz GpgFrontend-d989b48429ff9e37316d3c5c523e3cf53bbf5907.zip |
Streamline, expand and improve the interface of GpgContext.
Fix the wrong use of the query interface for fingerprints or identifiers at VerifyKeyDetailBox.cpp and VerifyNotification.cpp.
Write the processing logic and page logic for adding a signature to the key.
Signed-off-by: Saturneric <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | src/gpg/GpgKey.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gpg/GpgKey.cpp b/src/gpg/GpgKey.cpp index 51ab2158..99972eee 100644 --- a/src/gpg/GpgKey.cpp +++ b/src/gpg/GpgKey.cpp @@ -28,6 +28,8 @@ void GpgKey::parse(gpgme_key_t key) { if(key == nullptr) return; + + good = true; key_refer = key; gpgme_key_ref(key_refer); @@ -68,6 +70,7 @@ void GpgKey::parse(gpgme_key_t key) { break; } + uids.clear(); auto uid = key->uids; while (uid != nullptr) { @@ -75,13 +78,13 @@ void GpgKey::parse(gpgme_key_t key) { uid = uid->next; } - if (!uids.isEmpty()) { name = uids.first().name; email = uids.first().email; comment = uids.first().comment; } + subKeys.clear(); auto next = key->subkeys; while (next != nullptr) { @@ -169,6 +172,7 @@ GpgKey &GpgKey::operator=(const GpgKey &k) { good = k.good; subKeys = k.subKeys; + uids = k.uids; key_refer = k.key_refer; gpgme_key_ref(key_refer); @@ -197,6 +201,7 @@ GpgKey::GpgKey(const GpgKey &k) : good = k.good; subKeys = k.subKeys; + uids = k.uids; key_refer = k.key_refer; gpgme_key_ref(key_refer); |