From 661a6d0bf6983ea4462ce2c16d63b457285c10ce Mon Sep 17 00:00:00 2001 From: Anthony Hu Date: Tue, 7 Jul 2026 15:04:39 -0400 Subject: [PATCH] Change API const in .h instead of .c --- src/internal.c | 6 +++--- wolfssl/internal.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/internal.c b/src/internal.c index 5455581abd..3e0e55bbe5 100644 --- a/src/internal.c +++ b/src/internal.c @@ -658,7 +658,7 @@ int IsAtLeastTLSv1_2(const WOLFSSL* ssl) return 0; } -int IsAtLeastTLSv1_3(ProtocolVersion pv) +int IsAtLeastTLSv1_3(const ProtocolVersion pv) { int ret; ret = (pv.major == SSLv3_MAJOR && pv.minor >= TLSv1_3_MINOR); @@ -29107,7 +29107,7 @@ int GetCipherNamesSize(void) } -const char* GetCipherNameInternal(byte cipherSuite0, byte cipherSuite) +const char* GetCipherNameInternal(const byte cipherSuite0, const byte cipherSuite) { int i; const char* nameInternal = "None"; @@ -29434,7 +29434,7 @@ int SetCipherBits(const char* enc) { } #endif /* WOLFSSL_QT || OPENSSL_ALL */ -const char* GetCipherNameIana(byte cipherSuite0, byte cipherSuite) +const char* GetCipherNameIana(const byte cipherSuite0, const byte cipherSuite) { #ifndef NO_ERROR_STRINGS int i; diff --git a/wolfssl/internal.h b/wolfssl/internal.h index 06f839690e..943e07d26f 100644 --- a/wolfssl/internal.h +++ b/wolfssl/internal.h @@ -6952,7 +6952,7 @@ WOLFSSL_LOCAL int StoreKeys(WOLFSSL* ssl, const byte* keyData, int side); WOLFSSL_LOCAL int IsTLS(const WOLFSSL* ssl); WOLFSSL_LOCAL int IsTLS_ex(const ProtocolVersion pv); WOLFSSL_LOCAL int IsAtLeastTLSv1_2(const WOLFSSL* ssl); -WOLFSSL_LOCAL int IsAtLeastTLSv1_3(ProtocolVersion pv); +WOLFSSL_LOCAL int IsAtLeastTLSv1_3(const ProtocolVersion pv); WOLFSSL_LOCAL int IsEncryptionOn(const WOLFSSL* ssl, int isSend); WOLFSSL_LOCAL int TLSv1_3_Capable(WOLFSSL* ssl); @@ -7262,7 +7262,7 @@ typedef struct CipherSuiteInfo { #endif WOLFSSL_TEST_VIS const CipherSuiteInfo* GetCipherNames(void); WOLFSSL_TEST_VIS int GetCipherNamesSize(void); -WOLFSSL_LOCAL const char* GetCipherNameInternal(byte cipherSuite0, byte cipherSuite); +WOLFSSL_LOCAL const char* GetCipherNameInternal(const byte cipherSuite0, const byte cipherSuite); #if defined(OPENSSL_ALL) || defined(WOLFSSL_QT) /* used in wolfSSL_sk_CIPHER_description */ #define MAX_SEGMENTS 5 @@ -7278,7 +7278,7 @@ WOLFSSL_LOCAL const char* GetCipherMacStr(char n[][MAX_SEGMENT_SZ]); WOLFSSL_LOCAL int SetCipherBits(const char* enc); WOLFSSL_LOCAL int IsCipherAEAD(char n[][MAX_SEGMENT_SZ]); #endif -WOLFSSL_LOCAL const char* GetCipherNameIana(byte cipherSuite0, byte cipherSuite); +WOLFSSL_LOCAL const char* GetCipherNameIana(const byte cipherSuite0, const byte cipherSuite); WOLFSSL_LOCAL const char* wolfSSL_get_cipher_name_internal(WOLFSSL* ssl); WOLFSSL_LOCAL const char* wolfSSL_get_cipher_name_iana(WOLFSSL* ssl); WOLFSSL_LOCAL int GetCipherSuiteFromName(const char* name, byte* cipherSuite0,