Permalink
Browse files

Fixed a bug, where a search for a non-existing key triggered an error.

The error code for "Key not found" changed with gpg 2.2.12
[#174 state:fixed]
  • Loading branch information...
Mento committed Jan 7, 2019
1 parent 80c68f3 commit 5e2fc453f091a48e1f0000d5a3d078f92ea43fe7
Showing with 3 additions and 1 deletion.
  1. +3 −1 Source/GPGController.m
@@ -2321,7 +2321,9 @@ - (void)sendKeysToServer:(NSObject <EnumerationList> *)keys {
[gpgTask addArgument:@"--"];
[gpgTask addArgument:pattern];

if ([gpgTask start] != 0 && gpgTask.errorCode != GPGErrorNoData) {
if ([gpgTask start] != 0 &&
gpgTask.errorCode != GPGErrorNoData && // Key not found response from old (< 2.2.12) gpg.
gpgTask.errorCode != GPGErrorNotFound) { // Key not found response from new (>= 2.2.12) gpg.
@throw [GPGException exceptionWithReason:localizedLibmacgpgString(@"Search keys failed!") gpgTask:gpgTask];
}

0 comments on commit 5e2fc45

Please sign in to comment.