7aed4171dc
Update gpgme to 1.17.1 (fix libqpgpme ABI, #2127553) Prepare for distutils drop in Python 3.12+ (#2135758) Fix tests on 32-bit machines (#2096365) Use SPDX syntax for License field Add option to not build Qt binding (qgpgme)
44 lines
1.8 KiB
Diff
44 lines
1.8 KiB
Diff
From 2fa5c80aeba4528b3bdf41ec5740e7db5d4b6d2b Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de>
|
|
Date: Thu, 18 Aug 2022 10:43:19 +0200
|
|
Subject: [PATCH] cpp: Fix handling of "no key" or "invalid time" situations
|
|
|
|
* lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
|
|
(GpgAddExistingSubkeyEditInteractor::Private::nextState): Fix inverted
|
|
logic of string comparisons.
|
|
--
|
|
|
|
This fixes the problem that the interactor didn't return the proper
|
|
error code if gpg didn't accept the key grip or the expiration date.
|
|
|
|
GnuPG-bug-id: 6137
|
|
---
|
|
lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
|
|
index 547e613d..8eec7460 100644
|
|
--- a/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
|
|
+++ b/lang/cpp/src/gpgaddexistingsubkeyeditinteractor.cpp
|
|
@@ -136,7 +136,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
|
|
strcmp(args, "keygen.flags") == 0) {
|
|
return FLAGS;
|
|
} else if (status == GPGME_STATUS_GET_LINE &&
|
|
- strcmp(args, "keygen.keygrip")) {
|
|
+ strcmp(args, "keygen.keygrip") == 0) {
|
|
err = NO_KEY_ERROR;
|
|
return ERROR;
|
|
}
|
|
@@ -157,7 +157,7 @@ unsigned int GpgAddExistingSubkeyEditInteractor::Private::nextState(unsigned int
|
|
strcmp(args, "keyedit.prompt") == 0) {
|
|
return QUIT;
|
|
} else if (status == GPGME_STATUS_GET_LINE &&
|
|
- strcmp(args, "keygen.valid")) {
|
|
+ strcmp(args, "keygen.valid") == 0) {
|
|
err = INV_TIME_ERROR;
|
|
return ERROR;
|
|
}
|
|
--
|
|
2.37.1
|
|
|