Skip to content

Commit

Permalink
Fix boolean expression in pgp_key_provider_t::request_key().
Browse files Browse the repository at this point in the history
  • Loading branch information
ni4 committed Aug 29, 2023
1 parent 13b1bbe commit 4927a9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/key-provider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pgp_key_provider_t::request_key(const pgp_key_request_ctx_t &ctx) const
return nullptr;
}
// confirm that the key actually matches the search criteria
if (!key->matches(ctx.search) && key->is_secret() == ctx.secret) {
if (!key->matches(ctx.search) || (key->is_secret() != ctx.secret)) {
return nullptr;
}
return key;
Expand Down

0 comments on commit 4927a9c

Please sign in to comment.