diff options
author | Dmitry Belyavskiy <beldmit@gmail.com> | 2022-04-12 12:30:08 +0200 |
---|---|---|
committer | Dmitry Belyavskiy <beldmit@gmail.com> | 2022-04-21 17:12:32 +0200 |
commit | 2c31d942af28a20e87979cbc76c3dd8d162c1a9c (patch) | |
tree | a7927f89d19ef4c9604eb80fbefc4fa1ac2d4734 /crypto/conf/conf_def.c | |
parent | a8e4ddc6d15b6e6b308428753bc22b12422adacf (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/18103)
Diffstat (limited to 'crypto/conf/conf_def.c')
-rw-r--r-- | crypto/conf/conf_def.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c index c05c3c6b10..6fe8427dc5 100644 --- a/crypto/conf/conf_def.c +++ b/crypto/conf/conf_def.c @@ -11,7 +11,7 @@ #include <stdio.h> #include <string.h> -#include "e_os.h" /* strcasecmp and struct stat */ +#include "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; |