summaryrefslogtreecommitdiffstats
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-21 17:12:32 +0200
commit2c31d942af28a20e87979cbc76c3dd8d162c1a9c (patch)
treea7927f89d19ef4c9604eb80fbefc4fa1ac2d4734 /crypto/encode_decode
parenta8e4ddc6d15b6e6b308428753bc22b12422adacf (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/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 10a38b6f82..de6d3def31 100644
--- a/crypto/encode_decode/decoder_lib.c
+++ b/crypto/encode_decode/decoder_lib.c
@@ -789,7 +789,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) {
@@ -850,7 +850,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",
@@ -896,7 +896,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",
@@ -915,7 +916,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 475117a463..833061d873 100644
--- a/crypto/encode_decode/decoder_pkey.c
+++ b/crypto/encode_decode/decoder_pkey.c
@@ -18,7 +18,6 @@
#include "crypto/evp.h"
#include "crypto/decoder.h"
#include "encoder_local.h"
-#include "e_os.h" /* strcasecmp on Windows */
int OSSL_DECODER_CTX_set_passphrase(OSSL_DECODER_CTX *ctx,
const unsigned char *kstr,
diff --git a/crypto/encode_decode/encoder_lib.c b/crypto/encode_decode/encoder_lib.c
index cfd9275172..2a83af825c 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 "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 c37edf966d..3a24317cf4 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 "e_os.h" /* strcasecmp on Windows */
#include <openssl/err.h>
#include <openssl/ui.h>
#include <openssl/params.h>