summaryrefslogtreecommitdiff
path: root/crypto/encode_decode
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/encode_decode
parent4b2bd2722b8294a6b27c9e1fcf7d76f7d9de9b44 (diff)
downloadopenssl-new-fba140c73541c03e22b4fdb219a05d129bf0406d.tar.gz
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/encode_decode')
-rw-r--r--crypto/encode_decode/decoder_lib.c10
-rw-r--r--crypto/encode_decode/decoder_pkey.c1
-rw-r--r--crypto/encode_decode/encoder_lib.c9
-rw-r--r--crypto/encode_decode/encoder_pkey.c1
4 files changed, 10 insertions, 11 deletions
diff --git a/crypto/encode_decode/decoder_lib.c b/crypto/encode_decode/decoder_lib.c
index 6781c61c6c..768c58c310 100644
--- a/crypto/encode_decode/decoder_lib.c
+++ b/crypto/encode_decode/decoder_lib.c
@@ -796,7 +796,7 @@ static int decoder_process(const OSSL_PARAM params[], void *arg)
*/
trace_data_structure = data_structure;
if (data_type != NULL && data_structure != NULL
- && strcasecmp(data_structure, "type-specific") == 0)
+ && OPENSSL_strcasecmp(data_structure, "type-specific") == 0)
data_structure = NULL;
OSSL_TRACE_BEGIN(DECODER) {
@@ -857,7 +857,7 @@ static int decoder_process(const OSSL_PARAM params[], void *arg)
* that's the case, we do this extra check.
*/
if (decoder == NULL && ctx->start_input_type != NULL
- && strcasecmp(ctx->start_input_type, new_input_type) != 0) {
+ && OPENSSL_strcasecmp(ctx->start_input_type, new_input_type) != 0) {
OSSL_TRACE_BEGIN(DECODER) {
BIO_printf(trc_out,
"(ctx %p) %s [%u] the start input type '%s' doesn't match the input type of the considered decoder, skipping...\n",
@@ -904,7 +904,8 @@ static int decoder_process(const OSSL_PARAM params[], void *arg)
*/
if (data_structure != NULL
&& (new_input_structure == NULL
- || strcasecmp(data_structure, new_input_structure) != 0)) {
+ || OPENSSL_strcasecmp(data_structure,
+ new_input_structure) != 0)) {
OSSL_TRACE_BEGIN(DECODER) {
BIO_printf(trc_out,
"(ctx %p) %s [%u] the previous decoder's data structure doesn't match the input structure of the considered decoder, skipping...\n",
@@ -923,7 +924,8 @@ static int decoder_process(const OSSL_PARAM params[], void *arg)
&& ctx->input_structure != NULL
&& new_input_structure != NULL) {
data->flag_input_structure_checked = 1;
- if (strcasecmp(new_input_structure, ctx->input_structure) != 0) {
+ if (OPENSSL_strcasecmp(new_input_structure,
+ ctx->input_structure) != 0) {
OSSL_TRACE_BEGIN(DECODER) {
BIO_printf(trc_out,
"(ctx %p) %s [%u] the previous decoder's data structure doesn't match the input structure given by the user, skipping...\n",
diff --git a/crypto/encode_decode/decoder_pkey.c b/crypto/encode_decode/decoder_pkey.c
index 8cb320a5ce..268c05ce2d 100644
--- a/crypto/encode_decode/decoder_pkey.c
+++ b/crypto/encode_decode/decoder_pkey.c
@@ -19,7 +19,6 @@
#include "crypto/decoder.h"
#include "crypto/evp/evp_local.h"
#include "encoder_local.h"
-#include "internal/e_os.h" /* strcasecmp on Windows */
#include "internal/namemap.h"
int OSSL_DECODER_CTX_set_passphrase(OSSL_DECODER_CTX *ctx,
diff --git a/crypto/encode_decode/encoder_lib.c b/crypto/encode_decode/encoder_lib.c
index 52cc404097..ded8bae8af 100644
--- a/crypto/encode_decode/encoder_lib.c
+++ b/crypto/encode_decode/encoder_lib.c
@@ -7,7 +7,6 @@
* https://www.openssl.org/source/license.html
*/
-#include "internal/e_os.h" /* strcasecmp on Windows */
#include <openssl/core_names.h>
#include <openssl/bio.h>
#include <openssl/encoder.h>
@@ -453,8 +452,8 @@ static int encoder_process(struct encoder_process_data_st *data)
*/
if (top) {
if (data->ctx->output_type != NULL
- && strcasecmp(current_output_type,
- data->ctx->output_type) != 0) {
+ && OPENSSL_strcasecmp(current_output_type,
+ data->ctx->output_type) != 0) {
OSSL_TRACE_BEGIN(ENCODER) {
BIO_printf(trc_out,
"[%d] Skipping because current encoder output type (%s) != desired output type (%s)\n",
@@ -482,8 +481,8 @@ static int encoder_process(struct encoder_process_data_st *data)
*/
if (data->ctx->output_structure != NULL
&& current_output_structure != NULL) {
- if (strcasecmp(data->ctx->output_structure,
- current_output_structure) != 0) {
+ if (OPENSSL_strcasecmp(data->ctx->output_structure,
+ current_output_structure) != 0) {
OSSL_TRACE_BEGIN(ENCODER) {
BIO_printf(trc_out,
"[%d] Skipping because current encoder output structure (%s) != ctx output structure (%s)\n",
diff --git a/crypto/encode_decode/encoder_pkey.c b/crypto/encode_decode/encoder_pkey.c
index 74765a58ea..e39ec275da 100644
--- a/crypto/encode_decode/encoder_pkey.c
+++ b/crypto/encode_decode/encoder_pkey.c
@@ -7,7 +7,6 @@
* https://www.openssl.org/source/license.html
*/
-#include "internal/e_os.h" /* strcasecmp on Windows */
#include <openssl/err.h>
#include <openssl/ui.h>
#include <openssl/params.h>