summaryrefslogtreecommitdiffstats
path: root/engines/e_ossltest.c
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2021-06-24 10:29:37 +0200
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>2021-11-17 15:48:37 +0100
commit747adb6a0134e3b707fbc47d0f0c52d6ff9c4223 (patch)
treef3b93461fdfeef10680e31e763e5b7e9821e1563 /engines/e_ossltest.c
parent2ff286c26c29b69b02ca99656d26d2f8cfd54682 (diff)
Add and use HAS_CASE_PREFIX(), CHECK_AND_SKIP_CASE_PREFIX(), and HAS_CASE_SUFFIX()
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15847)
Diffstat (limited to 'engines/e_ossltest.c')
-rw-r--r--engines/e_ossltest.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/engines/e_ossltest.c b/engines/e_ossltest.c
index df0805b197..5b25a0eaf1 100644
--- a/engines/e_ossltest.c
+++ b/engines/e_ossltest.c
@@ -27,6 +27,7 @@
#include <stdio.h>
#include <string.h>
+#include "internal/cryptlib.h"
#include <openssl/engine.h>
#include <openssl/sha.h>
@@ -42,10 +43,6 @@
#include "e_ossltest_err.c"
-#ifdef _WIN32
-# define strncasecmp _strnicmp
-#endif
-
/* Engine Id and Name */
static const char *engine_ossltest_id = "ossltest";
static const char *engine_ossltest_name = "OpenSSL Test engine support";
@@ -383,9 +380,8 @@ static EVP_PKEY *load_key(ENGINE *eng, const char *key_id, int pub,
BIO *in;
EVP_PKEY *key;
- if (strncasecmp(key_id, "ot:", 3) != 0)
+ if (!CHECK_AND_SKIP_CASE_PREFIX(key_id, "ot:"))
return NULL;
- key_id += 3;
fprintf(stderr, "[ossltest]Loading %s key %s\n",
pub ? "Public" : "Private", key_id);