From ca4faaf1ec450fbdf088a79fe4ea20cdec877bed Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 7 Oct 2024 16:57:08 -0400 Subject: [PATCH] Fix tests/util.c condition check Signed-off-by: Simo Sorce --- tests/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/util.c b/tests/util.c index d6d2df5a..a2980c70 100644 --- a/tests/util.c +++ b/tests/util.c @@ -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 */