net: mqtt: change cipher and sec_tag lists to const
cipher_list and sec_tag_list are used only with zsock_setsockopt in MQTT. For that use, they can be const (and potentially kept in flash memory). Signed-off-by: Miika Karanki <miika.karanki@vaisala.com>
This commit is contained in:
parent
8b6382e68d
commit
7ae9a0b55d
3 changed files with 4 additions and 4 deletions
|
|
@ -348,13 +348,13 @@ struct mqtt_sec_config {
|
|||
/** Indicates the list of ciphers to be used for the session.
|
||||
* May be NULL to use the default ciphers.
|
||||
*/
|
||||
int *cipher_list;
|
||||
const int *cipher_list;
|
||||
|
||||
/** Indicates the number of entries in the sec tag list. */
|
||||
uint32_t sec_tag_count;
|
||||
|
||||
/** Indicates the list of security tags to be used for the session. */
|
||||
sec_tag_t *sec_tag_list;
|
||||
const sec_tag_t *sec_tag_list;
|
||||
|
||||
/** Peer hostname for ceritificate verification.
|
||||
* May be NULL to skip hostname verification.
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ static bool do_subscribe; /* Trigger client to subscribe */
|
|||
#define TLS_TAG_DEVICE_PRIVATE_KEY 1
|
||||
#define TLS_TAG_AWS_CA_CERTIFICATE 2
|
||||
|
||||
static sec_tag_t sec_tls_tags[] = {
|
||||
static const sec_tag_t sec_tls_tags[] = {
|
||||
TLS_TAG_DEVICE_CERTIFICATE,
|
||||
TLS_TAG_AWS_CA_CERTIFICATE,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ static K_SEM_DEFINE(mqtt_start, 0, 1);
|
|||
#define TLS_SNI_HOSTNAME CONFIG_SAMPLE_CLOUD_AZURE_HOSTNAME
|
||||
#define APP_CA_CERT_TAG 1
|
||||
|
||||
static sec_tag_t m_sec_tags[] = {
|
||||
static const sec_tag_t m_sec_tags[] = {
|
||||
APP_CA_CERT_TAG,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue