aboutsummaryrefslogtreecommitdiffstats
path: root/lang/cpp/src/key.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lang/cpp/src/key.cpp')
-rw-r--r--lang/cpp/src/key.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lang/cpp/src/key.cpp b/lang/cpp/src/key.cpp
index 5d6560b1..cb0c186e 100644
--- a/lang/cpp/src/key.cpp
+++ b/lang/cpp/src/key.cpp
@@ -337,6 +337,10 @@ const Key &Key::mergeWith(const Key &other)
for (gpgme_sub_key_t hissk = him->subkeys ; hissk ; hissk = hissk->next) {
if (strcmp(mysk->fpr, hissk->fpr) == 0) {
mysk->is_cardkey |= hissk->is_cardkey;
+ mysk->secret |= hissk->secret;
+ if (hissk->keygrip && !mysk->keygrip) {
+ mysk->keygrip = strdup(hissk->keygrip);
+ }
break;
}
}