TLS: Avoid discarded-qualifiers

Just a build issue fix depending on GCC5+ configuration, fixes:

assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
return discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]

Signed-off-by: Richard Allen <richard@bryghtlabs.com>
This commit is contained in:
Richard Allen
2026-07-29 09:07:30 +05:30
committed by Kapil Gupta
parent 290676c22c
commit eae3c6a2db
2 changed files with 2 additions and 2 deletions

View File

@@ -614,7 +614,7 @@ int tlsv1_client_prf(struct tlsv1_client *conn, const char *label,
int tlsv1_client_get_cipher(struct tlsv1_client *conn, char *buf,
size_t buflen)
{
char *cipher;
const char *cipher;
switch (conn->rl.cipher_suite) {
case TLS_RSA_WITH_RC4_128_MD5:

View File

@@ -459,7 +459,7 @@ int x509_parse_name(const u8 *buf, size_t len, struct x509_name *name,
}
static char * x509_name_attr_str(enum x509_name_attr_type type)
static const char * x509_name_attr_str(enum x509_name_attr_type type)
{
switch (type) {
case X509_NAME_ATTR_NOT_USED: