From 36f7f7a478228a64d3d51a4901a264c8f55f90bb Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Tue, 29 Oct 2019 16:26:42 +0100 Subject: cpp: Add support for multiple keysigs in edit * lang/cpp/src/gpgsignkeyeditinteractor.cpp (GpgSignKeyEditInteractor::setDupeOk): New. (makeTable): Add new tansitions. (SignKeyState): Add DUPE_OK Status. (GpgSignKeyEditInteractor::action): Handle DUPE_OK. (GpgSignKeyEditInteractor::Private::Private): Carry flag. -- When extended-edit is enabled this can be used to answer the "dupe_ok" query from the edit-key with yes. This is for: GnuPG-Bug-Id: T4734 --- lang/cpp/src/gpgsignkeyeditinteractor.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lang/cpp/src/gpgsignkeyeditinteractor.h') diff --git a/lang/cpp/src/gpgsignkeyeditinteractor.h b/lang/cpp/src/gpgsignkeyeditinteractor.h index 34b1f064..bb5320a2 100644 --- a/lang/cpp/src/gpgsignkeyeditinteractor.h +++ b/lang/cpp/src/gpgsignkeyeditinteractor.h @@ -52,6 +52,11 @@ public: void setUserIDsToSign(const std::vector &userIDsToSign); void setSigningOptions(int options); + /* Set this if it is ok to overwrite an existing signature. In that + * case the context has to have the flag "extended-edit" set to 1 through + * Context::setFlag before calling edit.*/ + void setDupeOk(bool value); + private: const char *action(Error &err) const override; unsigned int nextState(unsigned int statusCode, const char *args, Error &err) const override; -- cgit v1.2.3