Skip to content

Commit c96a1a6

Browse files
eivindj-nordicrlubos
authored andcommitted
net: lib: fota_download: fix for native TLS in download client
The download client init is clearing the DLC struct. Therefore, the use_native_tls field has to be set after the initialization. Signed-off-by: Eivind Jølsgard <[email protected]>
1 parent 9582753 commit c96a1a6

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,10 @@ Libraries for networking
10471047

10481048
* Updated to use INF log level when the cloud side changes the log level.
10491049

1050+
* :ref:`lib_fota_download` library:
1051+
1052+
* Fixed an issue where the download client instance did not use native TLS although the :kconfig:option:`CONFIG_FOTA_DOWNLOAD_NATIVE_TLS` Kconfig option was enabled.
1053+
10501054
* :ref:`lib_nrf_cloud_fota` library:
10511055

10521056
* Added:

subsys/net/lib/fota_download/src/fota_download.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -670,20 +670,20 @@ static int fota_download_object_init(void)
670670
{
671671
int err;
672672

673-
#ifdef CONFIG_FOTA_DOWNLOAD_NATIVE_TLS
674-
/* Enable native TLS for the download client socket
675-
* if configured.
676-
*/
677-
dlc.set_native_tls = CONFIG_FOTA_DOWNLOAD_NATIVE_TLS;
678-
#endif
679-
680673
k_work_init_delayable(&dlc_with_offset_work, download_with_offset);
681674

682675
err = download_client_init(&dlc, download_client_callback);
683676
if (err != 0) {
684677
return err;
685678
}
686679

680+
#ifdef CONFIG_FOTA_DOWNLOAD_NATIVE_TLS
681+
/* Enable native TLS for the download client socket
682+
* if configured.
683+
*/
684+
dlc.set_native_tls = true;
685+
#endif
686+
687687
initialized = true;
688688
return 0;
689689
}

0 commit comments

Comments
 (0)