From e327305b9669107235ebe5e1e929988c1adefce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Tue, 15 Apr 2025 09:15:59 +0200 Subject: cpp: Add missing transition, remove two ignored (and wrong) transitions * lang/cpp/src/gpgsignkeyeditinteractor.cpp (makeTable): Remove two transitions. Add one transition. * lang/cpp/src/gpgsignkeyeditinteractor.cpp (makeTable) : Add one more transition. -- This adds a missing transition for the CONFIRM2 state which ensures that the certification is properly completed in case two confirmations were requested. And it removes two useless (and wrong) transitions which are overwritten by two later correct transitions in the map. GnuPG-bug-id: 7600 This is gpgmepp commit 5b77f4072d03342b8719bbe93fc77641fffb476a The second patch fixed a bug seen before we could test Ingo's patch. - wk --- lang/cpp/src/gpgsignkeyeditinteractor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/cpp/src/gpgsignkeyeditinteractor.cpp b/lang/cpp/src/gpgsignkeyeditinteractor.cpp index b1ecad3b..8ce54abd 100644 --- a/lang/cpp/src/gpgsignkeyeditinteractor.cpp +++ b/lang/cpp/src/gpgsignkeyeditinteractor.cpp @@ -217,8 +217,6 @@ static GpgSignKeyEditInteractor_Private::TransitionMap makeTable() addEntry(DUPE_OK2, GET_LINE, "trustsig_prompt.trust_value", SET_TRUST_VALUE); addEntry(CONFIRM, GET_BOOL, "sign_uid.okay", CONFIRM2); addEntry(CONFIRM2, GET_BOOL, "sign_uid.okay", CONFIRM); - addEntry(CONFIRM, GET_LINE, "keyedit.prompt", COMMAND); - addEntry(CONFIRM2, GET_LINE, "keyedit.prompt", COMMAND); addEntry(CONFIRM, GET_LINE, "trustsig_prompt.trust_value", SET_TRUST_VALUE); addEntry(CONFIRM2, GET_LINE, "trustsig_prompt.trust_value", SET_TRUST_VALUE); addEntry(CONFIRM, GET_LINE, "sign_uid.expire", SET_EXPIRE); @@ -234,7 +232,9 @@ static GpgSignKeyEditInteractor_Private::TransitionMap makeTable() addEntry(UIDS_LIST_SEPARATELY_DONE, GET_BOOL, "sign_uid.dupe_okay", DUPE_OK); addEntry(DUPE_OK, GET_BOOL, "sign_uid.dupe_okay", DUPE_OK2); addEntry(DUPE_OK2, GET_BOOL, "sign_uid.dupe_okay", DUPE_OK); + addEntry(CONFIRM, GET_BOOL, "sign_uid.dupe_okay", DUPE_OK); addEntry(CONFIRM, GET_LINE, "keyedit.prompt", QUIT); + addEntry(CONFIRM2, GET_LINE, "keyedit.prompt", QUIT); addEntry(REJECT_SIGN_EXPIRED, GET_LINE, "keyedit.prompt", QUIT); addEntry(ERROR, GET_LINE, "keyedit.prompt", QUIT); addEntry(QUIT, GET_BOOL, "keyedit.save.okay", SAVE); -- cgit v1.2.3