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
This commit is contained in:
parent
f2b48de26b
commit
2fa5c80aeb
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user