]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
const up some more low hanging things
authorCaolán McNamara <caolanm@gmail.com>
Fri, 28 Nov 2025 09:05:07 +0000 (09:05 +0000)
committerTomas Mraz <tomas@openssl.org>
Wed, 3 Dec 2025 15:02:50 +0000 (16:02 +0100)
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/29246)

crypto/bn/rsaz_exp_x2.c
crypto/evp/e_aes_cbc_hmac_sha1.c
crypto/evp/e_aes_cbc_hmac_sha256.c
crypto/store/store_strings.c
crypto/ts/ts_rsp_verify.c

index e3354620873534ea1cd3de5b29ab53ff5a8c1154..023d0cc30e606f15233670644a3485c715cd4327 100644 (file)
@@ -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,
index 79f118be03fe1ee3fa07523b3729f58d71127b96..56bf41b7812bc366489bec8d785ae0117e4a3778 100644 (file)
@@ -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
index d3c8196b66fef87b947372eb24acc8614308874e..45b250aeba837b16e9b4ea2f76f85c4e89abe8e4 100644 (file)
@@ -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
index 45c3f52acbf412504624c3966d052bfce3955510..8f20693b1cb7a5f9f8f0c6ff920da0198bf220ae 100644 (file)
@@ -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 */
index 0d9fa01e4337f701c3a5360d5c59a9c46f536d2c..8bfde55f729b190496c51ffd74f022fdcf570e7b 100644 (file)
@@ -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[] = {