From: Caolán McNamara Date: Fri, 28 Nov 2025 09:05:07 +0000 (+0000) Subject: const up some more low hanging things X-Git-Tag: 4.0-PRE-CLANG-FORMAT-WEBKIT~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e0dc7c91706d313a9cf9bd1972706a599933be1;p=thirdparty%2Fopenssl.git const up some more low hanging things Reviewed-by: Norbert Pocs Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/29246) --- diff --git a/crypto/bn/rsaz_exp_x2.c b/crypto/bn/rsaz_exp_x2.c index e3354620873..023d0cc30e6 100644 --- a/crypto/bn/rsaz_exp_x2.c +++ b/crypto/bn/rsaz_exp_x2.c @@ -149,7 +149,7 @@ static DAMM ossl_rsaz_amm52_x2[] = { typedef void (*DEXTRACT)(BN_ULONG *res, const BN_ULONG *red_table, int red_table_idx, int tbl_idx); -static DEXTRACT ossl_extract_multiplier_win5[] = { +static const DEXTRACT ossl_extract_multiplier_win5[] = { ossl_extract_multiplier_2x20_win5_avx, ossl_extract_multiplier_2x20_win5, ossl_extract_multiplier_2x30_win5_avx, ossl_extract_multiplier_2x30_win5, ossl_extract_multiplier_2x40_win5_avx, ossl_extract_multiplier_2x40_win5, diff --git a/crypto/evp/e_aes_cbc_hmac_sha1.c b/crypto/evp/e_aes_cbc_hmac_sha1.c index 79f118be03f..56bf41b7812 100644 --- a/crypto/evp/e_aes_cbc_hmac_sha1.c +++ b/crypto/evp/e_aes_cbc_hmac_sha1.c @@ -912,7 +912,7 @@ static int aesni_cbc_hmac_sha1_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, } } -static EVP_CIPHER aesni_128_cbc_hmac_sha1_cipher = { +static const EVP_CIPHER aesni_128_cbc_hmac_sha1_cipher = { # ifdef NID_aes_128_cbc_hmac_sha1 NID_aes_128_cbc_hmac_sha1, # else @@ -932,7 +932,7 @@ static EVP_CIPHER aesni_128_cbc_hmac_sha1_cipher = { NULL }; -static EVP_CIPHER aesni_256_cbc_hmac_sha1_cipher = { +static const EVP_CIPHER aesni_256_cbc_hmac_sha1_cipher = { # ifdef NID_aes_256_cbc_hmac_sha1 NID_aes_256_cbc_hmac_sha1, # else diff --git a/crypto/evp/e_aes_cbc_hmac_sha256.c b/crypto/evp/e_aes_cbc_hmac_sha256.c index d3c8196b66f..45b250aeba8 100644 --- a/crypto/evp/e_aes_cbc_hmac_sha256.c +++ b/crypto/evp/e_aes_cbc_hmac_sha256.c @@ -889,7 +889,7 @@ static int aesni_cbc_hmac_sha256_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, } } -static EVP_CIPHER aesni_128_cbc_hmac_sha256_cipher = { +static const EVP_CIPHER aesni_128_cbc_hmac_sha256_cipher = { # ifdef NID_aes_128_cbc_hmac_sha256 NID_aes_128_cbc_hmac_sha256, # else @@ -909,7 +909,7 @@ static EVP_CIPHER aesni_128_cbc_hmac_sha256_cipher = { NULL }; -static EVP_CIPHER aesni_256_cbc_hmac_sha256_cipher = { +static const EVP_CIPHER aesni_256_cbc_hmac_sha256_cipher = { # ifdef NID_aes_256_cbc_hmac_sha256 NID_aes_256_cbc_hmac_sha256, # else diff --git a/crypto/store/store_strings.c b/crypto/store/store_strings.c index 45c3f52acbf..8f20693b1cb 100644 --- a/crypto/store/store_strings.c +++ b/crypto/store/store_strings.c @@ -11,7 +11,7 @@ #include "internal/nelem.h" -static char *type_strings[] = { +static const char *const type_strings[] = { "Name", /* OSSL_STORE_INFO_NAME */ "Parameters", /* OSSL_STORE_INFO_PARAMS */ "Public key", /* OSSL_STORE_INFO_PUBKEY */ diff --git a/crypto/ts/ts_rsp_verify.c b/crypto/ts/ts_rsp_verify.c index 0d9fa01e433..8bfde55f729 100644 --- a/crypto/ts/ts_rsp_verify.c +++ b/crypto/ts/ts_rsp_verify.c @@ -58,7 +58,7 @@ static const char *ts_status_text[] = { #define TS_STATUS_TEXT_SIZE OSSL_NELEM(ts_status_text) -static struct { +static const struct { int code; const char *text; } ts_failure_info[] = {