From 194272dbc3e326cc32c1464bc6fda0c0d10b5559 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Fri, 13 Dec 2019 18:06:00 +0100 Subject: cpp, qt: Use uidhash to select uids for signing * lang/cpp/src/gpgsignkeyeditinteractor.cpp (action): Use uidhash instead of number. (GpgSignKeyEditInteractor::setKey): New. * lang/cpp/src/gpgsignkeyeditinteractor.h: Update accordingly. * lang/cpp/src/key.h, lang/cpp/src/key.cpp: Wrap uidhash. * lang/qt/src/qgpgmesignkeyjob.cpp: Set the key. -- Using the uidhash avoids problems when the user ids on --edit-key are different ones then the uids captured by gpgme when listing keys. Or if they are in a different order. This can happen with cached keys or keys with user attributes. --- lang/cpp/src/gpgsignkeyeditinteractor.h | 1 + 1 file changed, 1 insertion(+) (limited to 'lang/cpp/src/gpgsignkeyeditinteractor.h') diff --git a/lang/cpp/src/gpgsignkeyeditinteractor.h b/lang/cpp/src/gpgsignkeyeditinteractor.h index bb5320a2..d4596876 100644 --- a/lang/cpp/src/gpgsignkeyeditinteractor.h +++ b/lang/cpp/src/gpgsignkeyeditinteractor.h @@ -50,6 +50,7 @@ public: void setCheckLevel(unsigned int checkLevel); void setUserIDsToSign(const std::vector &userIDsToSign); + void setKey(const Key &key); void setSigningOptions(int options); /* Set this if it is ok to overwrite an existing signature. In that -- cgit