Use fingerprint instead of keyid when importing and deleting keys.

This commit is contained in:
SET
2020-11-11 21:09:43 +01:00
parent 9cce0febdb
commit 4f8ea18a66
5 changed files with 17 additions and 16 deletions

View File

@@ -17,9 +17,9 @@ GpgMECWorker::~GpgMECWorker() {
gpgme_release(c_ctx);
}
bool GpgMECWorker::DeleteKey(const char * fullKeyId, bool secret, GpgME::Error& e) {
bool GpgMECWorker::DeleteKey(const char * fpr, bool secret, GpgME::Error& e) {
gpgme_key_t c_key;
gpgme_error_t c_err = gpgme_get_key(c_ctx, fullKeyId, &c_key, secret);
gpgme_error_t c_err = gpgme_get_key(c_ctx, fpr, &c_key, secret);
if (c_key == NULL) {
e = GpgME::Error::fromCode(c_err);
return false;