aboutsummaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2025-04-18 23:23:15 +0000
committersaturneric <[email protected]>2025-04-18 23:23:15 +0000
commit0b91f3575db5fd191dd137053bd6bd8b6db03405 (patch)
treee60875ba1ae67772ad5f95808f2e68665faa4c39 /src/core
parentchore: update appstream configures (diff)
downloadGpgFrontend-0b91f3575db5fd191dd137053bd6bd8b6db03405.tar.gz
GpgFrontend-0b91f3575db5fd191dd137053bd6bd8b6db03405.zip
fix: operations of subkey
Diffstat (limited to 'src/core')
-rw-r--r--src/core/function/gpg/GpgAutomatonHandler.cpp6
-rw-r--r--src/core/function/gpg/GpgKeyManager.cpp6
-rw-r--r--src/core/function/gpg/GpgUIDOperator.cpp4
3 files changed, 8 insertions, 8 deletions
diff --git a/src/core/function/gpg/GpgAutomatonHandler.cpp b/src/core/function/gpg/GpgAutomatonHandler.cpp
index afa55299..c0ce853d 100644
--- a/src/core/function/gpg/GpgAutomatonHandler.cpp
+++ b/src/core/function/gpg/GpgAutomatonHandler.cpp
@@ -110,13 +110,13 @@ auto InteratorCbFunc(void* handle, const char* status, const char* args,
}
auto DoInteractImpl(GpgContext& ctx_, const GpgKeyPtr& key, bool card_edit,
- const QString& id,
+ const QString& fpr,
AutomatonNextStateHandler next_state_handler,
AutomatonActionHandler action_handler,
int flags) -> std::tuple<GpgError, bool> {
gpgme_key_t p_key = key == nullptr ? nullptr : static_cast<gpgme_key_t>(*key);
- AutomatonHandelStruct handel(card_edit, id);
+ AutomatonHandelStruct handel(card_edit, fpr);
handel.SetHandler(std::move(next_state_handler), std::move(action_handler));
GpgData data_out;
@@ -133,7 +133,7 @@ auto GpgAutomatonHandler::DoInteract(
int flags) -> std::tuple<GpgError, bool> {
assert(key != nullptr);
if (key == nullptr) return {GPG_ERR_USER_1, false};
- return DoInteractImpl(ctx_, key, false, key->ID(),
+ return DoInteractImpl(ctx_, key, false, key->Fingerprint(),
std::move(next_state_handler),
std::move(action_handler), flags);
}
diff --git a/src/core/function/gpg/GpgKeyManager.cpp b/src/core/function/gpg/GpgKeyManager.cpp
index 5fca4ed4..b2337659 100644
--- a/src/core/function/gpg/GpgKeyManager.cpp
+++ b/src/core/function/gpg/GpgKeyManager.cpp
@@ -168,7 +168,7 @@ auto GpgKeyManager::SetOwnerTrustLevel(const GpgKeyPtr& key,
};
auto [err, succ] = auto_.DoInteract(key, next_state_handler, action_handler);
- return err == GPG_ERR_NO_ERROR && !succ;
+ return err == GPG_ERR_NO_ERROR && succ;
}
auto GpgKeyManager::DeleteSubkey(const GpgKeyPtr& key,
@@ -246,7 +246,7 @@ auto GpgKeyManager::DeleteSubkey(const GpgKeyPtr& key,
};
auto [err, succ] = auto_.DoInteract(key, next_state_handler, action_handler);
- return err == GPG_ERR_NO_ERROR && !succ;
+ return err == GPG_ERR_NO_ERROR && succ;
}
auto GpgKeyManager::RevokeSubkey(const GpgKeyPtr& key, int subkey_index,
@@ -362,7 +362,7 @@ auto GpgKeyManager::RevokeSubkey(const GpgKeyPtr& key, int subkey_index,
};
auto [err, succ] = auto_.DoInteract(key, next_state_handler, action_handler);
- return err == GPG_ERR_NO_ERROR && !succ;
+ return err == GPG_ERR_NO_ERROR && succ;
}
} // namespace GpgFrontend \ No newline at end of file
diff --git a/src/core/function/gpg/GpgUIDOperator.cpp b/src/core/function/gpg/GpgUIDOperator.cpp
index ca056be0..e1b8b8af 100644
--- a/src/core/function/gpg/GpgUIDOperator.cpp
+++ b/src/core/function/gpg/GpgUIDOperator.cpp
@@ -130,7 +130,7 @@ auto GpgUIDOperator::DeleteUID(const GpgKeyPtr& key, int uid_index) -> bool {
};
auto [err, succ] = auto_.DoInteract(key, next_state_handler, action_handler);
- return err == GPG_ERR_NO_ERROR && !succ;
+ return err == GPG_ERR_NO_ERROR && succ;
}
auto GpgUIDOperator::RevokeUID(const GpgKeyPtr& key, int uid_index,
@@ -245,7 +245,7 @@ auto GpgUIDOperator::RevokeUID(const GpgKeyPtr& key, int uid_index,
};
auto [err, succ] = auto_.DoInteract(key, next_state_handler, action_handler);
- return err == GPG_ERR_NO_ERROR && !succ;
+ return err == GPG_ERR_NO_ERROR && succ;
}
} // namespace GpgFrontend