File: 30-0003-cpp-Add-missing-transition-remove-two-ignored-and-wr.patch

package info (click to toggle)
gpgme1.0 1.24.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,264 kB
  • sloc: ansic: 51,655; cpp: 27,213; sh: 12,776; python: 6,020; javascript: 3,773; makefile: 1,792; lisp: 1,652; sed: 37
file content (53 lines) | stat: -rw-r--r-- 2,566 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From e327305b9669107235ebe5e1e929988c1adefce9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
Date: Tue, 15 Apr 2025 09:15:59 +0200
Subject: [PATCH 3/4] 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)
<sign_uid.dupe_okay>: 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);
-- 
2.47.2