Skip to content

Commit

Permalink
Fix tests/util.c condition check
Browse files Browse the repository at this point in the history
Signed-off-by: Simo Sorce <[email protected]>
  • Loading branch information
simo5 committed Oct 8, 2024
1 parent 996ef73 commit 51fa94a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ EVP_PKEY *load_key(const char *uri)
exit(EXIT_FAILURE);
}

if (strncmp(uri, "pkcs11:", 7) && strstr(uri, "type=private") == NULL) {
if ((strncmp(uri, "pkcs11:", 7) == 0)
&& strstr(uri, "type=private") == NULL) {
/* This is a workaround for OpenSSL < 3.2.0 where the code fails
* to correctly source public keys unless explicitly requested
* via an expect hint */
Expand Down

0 comments on commit 51fa94a

Please sign in to comment.