summaryrefslogtreecommitdiffstats
path: root/crypto/conf/conf_def.c
diff options
context:
space:
mode:
authorDmitry Belyavskiy <beldmit@gmail.com>2022-04-12 12:30:08 +0200
committerDmitry Belyavskiy <beldmit@gmail.com>2022-04-22 11:34:41 +0200
commitfba140c73541c03e22b4fdb219a05d129bf0406d (patch)
treeb5c692f73ff063c2f071ef2383979fb8aa572164 /crypto/conf/conf_def.c
parent4b2bd2722b8294a6b27c9e1fcf7d76f7d9de9b44 (diff)
str[n]casecmp => OPENSSL_strncasecmp
Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18069)
Diffstat (limited to 'crypto/conf/conf_def.c')
-rw-r--r--crypto/conf/conf_def.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c
index 9d79a900c8..ef45e7d38e 100644
--- a/crypto/conf/conf_def.c
+++ b/crypto/conf/conf_def.c
@@ -11,7 +11,7 @@
#include <stdio.h>
#include <string.h>
-#include "internal/e_os.h" /* strcasecmp and struct stat */
+#include "internal/e_os.h" /* struct stat */
#ifdef __TANDEM
# include <sys/types.h> /* needed for stat.h */
# include <sys/stat.h> /* struct stat */
@@ -192,11 +192,11 @@ static int def_load(CONF *conf, const char *name, long *line)
/* Parse a boolean value and fill in *flag. Return 0 on error. */
static int parsebool(const char *pval, int *flag)
{
- if (strcasecmp(pval, "on") == 0
- || strcasecmp(pval, "true") == 0) {
+ if (OPENSSL_strcasecmp(pval, "on") == 0
+ || OPENSSL_strcasecmp(pval, "true") == 0) {
*flag = 1;
- } else if (strcasecmp(pval, "off") == 0
- || strcasecmp(pval, "false") == 0) {
+ } else if (OPENSSL_strcasecmp(pval, "off") == 0
+ || OPENSSL_strcasecmp(pval, "false") == 0) {
*flag = 0;
} else {
ERR_raise(ERR_LIB_CONF, CONF_R_INVALID_PRAGMA);
@@ -839,8 +839,10 @@ static BIO *get_next_file(const char *path, OPENSSL_DIR_CTX **dirctx)
namelen = strlen(filename);
- if ((namelen > 5 && strcasecmp(filename + namelen - 5, ".conf") == 0)
- || (namelen > 4 && strcasecmp(filename + namelen - 4, ".cnf") == 0)) {
+ if ((namelen > 5
+ && OPENSSL_strcasecmp(filename + namelen - 5, ".conf") == 0)
+ || (namelen > 4
+ && OPENSSL_strcasecmp(filename + namelen - 4, ".cnf") == 0)) {
size_t newlen;
char *newpath;
BIO *bio;