Skip to content

Commit aa5187e

Browse files
d3zd3zgalak
authored andcommitted
tls: Change some external symbols from Mbed TLS
In Mbed TLS: commit eccd88871767e2fba5f3a079cfdfcb77c376cf20 Author: Gilles Peskine <[email protected]> Date: Tue Mar 10 12:19:08 2020 +0100 Rename identifiers containing double-underscore changes the name of a symbol we use. As part of upgrading to newer versions of Mbed TLS, change the name of the symbol we use. A better fix would be to not use this symbol at all, and perhaps define our own symbol the same way this internal symbol is defined within the library. Signed-off-by: David Brown <[email protected]>
1 parent 1a7f959 commit aa5187e

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

samples/net/cloud/google_iot_mqtt/src/protocol.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static sec_tag_t m_sec_tags[] = {
6262
#if defined(MBEDTLS_X509_CRT_PARSE_C)
6363
1,
6464
#endif
65-
#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED)
65+
#if defined(MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED)
6666
APP_PSK_TAG,
6767
#endif
6868
};

samples/net/mqtt_publisher/src/main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static APP_DMEM sec_tag_t m_sec_tags[] = {
6767
#if defined(MBEDTLS_X509_CRT_PARSE_C) || defined(CONFIG_NET_SOCKETS_OFFLOAD)
6868
APP_CA_CERT_TAG,
6969
#endif
70-
#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED)
70+
#if defined(MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED)
7171
APP_PSK_TAG,
7272
#endif
7373
};
@@ -85,7 +85,7 @@ static int tls_init(void)
8585
}
8686
#endif
8787

88-
#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED)
88+
#if defined(MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED)
8989
err = tls_credential_add(APP_PSK_TAG, TLS_CREDENTIAL_PSK,
9090
client_psk, sizeof(client_psk));
9191
if (err < 0) {

samples/net/mqtt_publisher/src/test_certs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static const unsigned char ca_certificate[] = {
127127
};
128128
#endif /* MBEDTLS_X509_CRT_PARSE_C */
129129

130-
#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED)
130+
#if defined(MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED)
131131
/* Avoid leading zero in psk because there's a potential issue of mosquitto
132132
* that leading zero of psk will be skipped and it leads to TLS handshake
133133
* failure

subsys/net/lib/sockets/sockets_tls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ static int tls_set_psk(struct tls_context *tls,
731731
struct tls_credential *psk,
732732
struct tls_credential *psk_id)
733733
{
734-
#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED)
734+
#if defined(MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED)
735735
int err = mbedtls_ssl_conf_psk(&tls->config,
736736
psk->buf, psk->len,
737737
(const unsigned char *)psk_id->buf,

0 commit comments

Comments
 (0)