<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>TLS chain validation issue with ISRG Root X1 on nRF7002 using Zephyr</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/121499/tls-chain-validation-issue-with-isrg-root-x1-on-nrf7002-using-zephyr</link><description>Hi Nordic team, 
 I&amp;#39;m using the nRF5340 + nRF7002 to securely connect to my backend over HTTPS using Wi-Fi and the native TLS support (mbedTLS). 
 
 What works: 
 
 
 I can successfully connect to my server using the Let&amp;#39;s Encrypt R11 intermediate certificate</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 11 Jun 2025 21:41:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/121499/tls-chain-validation-issue-with-isrg-root-x1-on-nrf7002-using-zephyr" /><item><title>RE: TLS chain validation issue with ISRG Root X1 on nRF7002 using Zephyr</title><link>https://devzone.nordicsemi.com/thread/538910?ContentTypeID=1</link><pubDate>Wed, 11 Jun 2025 21:41:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8be3f07-9cc1-4b06-8f48-036b4b0c80ff</guid><dc:creator>Lucas Heitele</dc:creator><description>&lt;p data-start="64" data-end="73"&gt;Hi H&amp;aring;kon,&lt;/p&gt;
&lt;p data-start="75" data-end="326"&gt;thanks a lot for your help and hints!&lt;br data-start="112" data-end="115" /&gt; It turned out the issue was actually due to the mbedTLS heap size. After increasing &lt;code data-start="199" data-end="225"&gt;CONFIG_MBEDTLS_HEAP_SIZE&lt;/code&gt; to match the https_client sample, TLS chain validation with only ISRG Root X1 now works as expected.&lt;/p&gt;
&lt;p data-start="328" data-end="358"&gt;Appreciate your quick support!&lt;/p&gt;
&lt;p data-start="360" data-end="373"&gt;Best regards,&lt;br data-start="365" data-end="368" /&gt; Lucas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TLS chain validation issue with ISRG Root X1 on nRF7002 using Zephyr</title><link>https://devzone.nordicsemi.com/thread/538754?ContentTypeID=1</link><pubDate>Wed, 11 Jun 2025 07:18:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4efc8fc-3452-4742-ab3b-dec50904f4dc</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Lucas,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It is fine that you use AI to get a better overview of the situation, but please; post your input to the AI than the output from it.&lt;/p&gt;
&lt;p&gt;Post your log output, errno 2 is ENOENT, meaning that the socket does not exist.&lt;/p&gt;
[quote user="Lucas Heitele"]&lt;p&gt;Neither option is present or selectable via menuconfig, and even adding them manually doesn’t work (they’re ignored).&lt;br /&gt; I’m using nRF Connect SDK v2.6.0.&lt;/p&gt;
[/quote]
&lt;p&gt;I strongly recommend that you atleast update to the latest patch version, ie v2.6.4.&lt;/p&gt;
[quote user="Lucas Heitele"]Are these two config options (&lt;code&gt;CONFIG_MBEDTLS_PEM_PARSE_C&lt;/code&gt;, &lt;code&gt;CONFIG_MBEDTLS_PEM_WRITE_C&lt;/code&gt;) actually needed for the https_client sample on nRF7002 Wi-Fi?[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I did the exact same steps as before, just altered the domain name directly in main.c.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting nRF Connect SDK v3.5.99-ncs1-4 ***
HTTPS client sample started
Bringing network interface up
Provisioning certificate
Connecting to the network
uart:~$ wifi_cred add SSID WPA2-PSK PASSWORD
uart:~$ wifi_cred auto_connect 
[00:00:53.799,316] &amp;lt;inf&amp;gt; wifi_mgmt_ext: Connection requested
Network connectivity established and IP address assigned
Looking up api.eversion.tech
Resolved 194.164.55.211 (AF_INET)
Connecting to api.eversion.tech:443
Sent 67 bytes
Received 165 bytes

&amp;gt;        HTTP/1.1 404 Not Found

Finished, closing socket.
Network connectivity lost
Disconnected from the network
uart:~$&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please post your changes and the log output.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TLS chain validation issue with ISRG Root X1 on nRF7002 using Zephyr</title><link>https://devzone.nordicsemi.com/thread/538744?ContentTypeID=1</link><pubDate>Wed, 11 Jun 2025 06:44:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:414dd368-47ba-4df4-83b1-cd6ad57fe8d9</guid><dc:creator>pablow</dc:creator><description>&lt;p&gt;Thanks. I used some of the methods to fix things! &lt;span style="color:#ffffff;" data-sheets-root="1"&gt;&lt;a class="in-cell-link" style="color:#ffffff;" href="https://clean-link.com/"&gt;paint booth air filters&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TLS chain validation issue with ISRG Root X1 on nRF7002 using Zephyr</title><link>https://devzone.nordicsemi.com/thread/538742?ContentTypeID=1</link><pubDate>Wed, 11 Jun 2025 06:39:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36cc8dae-7e99-4d58-8b67-fe061afdbb84</guid><dc:creator>Lucas Heitele</dc:creator><description>&lt;hr data-start="145" data-end="148" /&gt;
&lt;p data-start="150" data-end="159"&gt;Hi H&amp;aring;kon,&lt;/p&gt;
&lt;p data-start="161" data-end="213"&gt;thanks for providing your detailed config and steps.&lt;/p&gt;
&lt;p data-start="215" data-end="396"&gt;I tried to apply your suggestions and the patch as closely as possible, but I noticed &lt;strong data-start="301" data-end="395"&gt;two of the MBEDTLS config options you added were not found anywhere in my SDK/Kconfig tree&lt;/strong&gt;:&lt;/p&gt;
&lt;ul data-start="398" data-end="459"&gt;
&lt;li data-start="398" data-end="428"&gt;
&lt;p data-start="400" data-end="428"&gt;&lt;code data-start="400" data-end="428"&gt;CONFIG_MBEDTLS_PEM_PARSE_C&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="429" data-end="459"&gt;
&lt;p data-start="431" data-end="459"&gt;&lt;code data-start="431" data-end="459"&gt;CONFIG_MBEDTLS_PEM_WRITE_C&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="461" data-end="657"&gt;Neither option is present or selectable via menuconfig, and even adding them manually doesn&amp;rsquo;t work (they&amp;rsquo;re ignored).&lt;br data-start="578" data-end="581" /&gt; I&amp;rsquo;m using nRF Connect SDK v2.6.0.&lt;/p&gt;
&lt;hr data-start="659" data-end="662" /&gt;
&lt;h3 data-start="664" data-end="684"&gt;My Observations:&lt;/h3&gt;
&lt;ul data-start="686" data-end="1065"&gt;
&lt;li data-start="686" data-end="786"&gt;
&lt;p data-start="688" data-end="786"&gt;I have the &lt;code data-start="699" data-end="715"&gt;isrgrootx1.pem&lt;/code&gt; in the correct folder, included with the CMake macro as you described.&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="787" data-end="843"&gt;
&lt;p data-start="789" data-end="843"&gt;Everything else in the sample matches what you posted.&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="844" data-end="900"&gt;
&lt;p data-start="846" data-end="900"&gt;I also disabled IPv6 (just to match your environment).&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="901" data-end="977"&gt;
&lt;p data-start="903" data-end="977"&gt;The build works, but those two MBEDTLS configs are simply not available.&lt;/p&gt;
&lt;/li&gt;
&lt;li data-start="978" data-end="1065"&gt;
&lt;p data-start="980" data-end="1065"&gt;The code runs and I can establish Wi-Fi, DNS resolves, and TLS socket setup proceeds.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-start="1067" data-end="1241"&gt;&lt;strong data-start="1067" data-end="1108"&gt;However, the final result is the same&lt;/strong&gt;:&lt;br data-start="1109" data-end="1112" /&gt; &lt;code data-start="1112" data-end="1123"&gt;connect()&lt;/code&gt; still fails with error -2 (&lt;code data-start="1151" data-end="1160"&gt;errno 2&lt;/code&gt;).&lt;br data-start="1162" data-end="1165" /&gt; If I use your patched configs exactly, the two PEM options are just missing.&lt;/p&gt;
&lt;hr data-start="1243" data-end="1246" /&gt;
&lt;h4 data-start="1248" data-end="1262"&gt;Question:&lt;/h4&gt;
&lt;p data-start="1263" data-end="1572"&gt;Are these two config options (&lt;code data-start="1293" data-end="1321"&gt;CONFIG_MBEDTLS_PEM_PARSE_C&lt;/code&gt;, &lt;code data-start="1323" data-end="1351"&gt;CONFIG_MBEDTLS_PEM_WRITE_C&lt;/code&gt;) actually needed for the https_client sample on nRF7002 Wi-Fi?&lt;br data-start="1414" data-end="1417" /&gt; Or could their absence indicate something&amp;rsquo;s off with my SDK/toolchain?&lt;br data-start="1487" data-end="1490" /&gt; Or did you maybe enable them in a different way (or with a different SDK version)?&lt;/p&gt;
&lt;p data-start="1574" data-end="1649"&gt;Would appreciate any input if you have more hints or if I&amp;rsquo;m missing a step!&lt;/p&gt;
&lt;p data-start="1651" data-end="1666"&gt;Thanks,&lt;br data-start="1658" data-end="1661" /&gt; Lucas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TLS chain validation issue with ISRG Root X1 on nRF7002 using Zephyr</title><link>https://devzone.nordicsemi.com/thread/536009?ContentTypeID=1</link><pubDate>Mon, 19 May 2025 13:38:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55c4eef7-0768-4692-8fde-fb2aa277eb42</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I downloaded the isrgrootx1 from here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://letsencrypt.org/certs/isrgrootx1.pem"&gt;https://letsencrypt.org/certs/isrgrootx1.pem&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Placed it in the https_client/certs folder.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is my modifications to the sample:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;diff --git a/samples/net/https_client/CMakeLists.txt b/samples/net/https_client/CMakeLists.txt
index 2a937786ed..1de98481a2 100644
--- a/samples/net/https_client/CMakeLists.txt
+++ b/samples/net/https_client/CMakeLists.txt
@@ -14,7 +14,7 @@ set(gen_dir ${CMAKE_CURRENT_BINARY_DIR}/certs)
 zephyr_include_directories(${gen_dir})
 generate_inc_file_for_target(
     app
-    cert/DigiCertGlobalG2.pem
+    cert/isrgrootx1.pem
     ${gen_dir}/DigiCertGlobalG2.pem.inc
     )
 
diff --git a/samples/net/https_client/Kconfig b/samples/net/https_client/Kconfig
index 90ad33f42e..f56cd9fc19 100644
--- a/samples/net/https_client/Kconfig
+++ b/samples/net/https_client/Kconfig
@@ -15,7 +15,7 @@ config SAMPLE_TFM_MBEDTLS
 
 config HTTPS_HOSTNAME
        string &amp;quot;HTTPS hostname&amp;quot;
-       default &amp;quot;example.com&amp;quot;
+       default &amp;quot;api.eversion.tech&amp;quot;
 
 endmenu
 
diff --git a/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf b/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf
index 9eb362cb16..bf6196291f 100644
--- a/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf
+++ b/samples/net/https_client/boards/nrf7002dk_nrf5340_cpuapp_ns.conf
@@ -69,3 +69,11 @@ CONFIG_MBEDTLS_TLS_LIBRARY=y
 CONFIG_TFM_PROFILE_TYPE_SMALL=y
 CONFIG_PM_PARTITION_SIZE_TFM_SRAM=0xc000
 CONFIG_PM_PARTITION_SIZE_TFM=0x20000
+CONFIG_PSA_WANT_RSA_KEY_SIZE_4096=y
+
+CONFIG_MBEDTLS_SSL_SERVER_NAME_INDICATION=y
+CONFIG_MBEDTLS_SSL_RENEGOTIATION=y
+CONFIG_MBEDTLS_PEM_PARSE_C=y
+CONFIG_MBEDTLS_PEM_WRITE_C=y
+CONFIG_MBEDTLS_MPI_MAX_SIZE=2048
+CONFIG_NET_IPV6=n
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And log output:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting nRF Connect SDK v2.9.1-60d0d6c8d42d ***
*** Using Zephyr OS v3.7.99-ca954a6216c9 ***
HTTPS client sample started
Bringing network interface up
Provisioning certificate
CA certificate already exists, sec tag: 42
Connecting to the network
[00:00:08.636,047] &amp;lt;inf&amp;gt; wifi_mgmt_ext: Connection requested
Network connectivity established and IP address assigned
Looking up api.eversion.tech
Resolved 194.164.55.211 (AF_INET)
Connecting to api.eversion.tech:443
Sent 67 bytes
Received 165 bytes

&amp;gt;        HTTP/1.1 404 Not Found

Finished, closing socket.
Network connectivity lost
Disconnected from the network
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try this and see if you are able to connect as well?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;PS: I have disabled ipv6 on my side due to my router being misconfigured / lacking proper ipv6 support from ISP.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TLS chain validation issue with ISRG Root X1 on nRF7002 using Zephyr</title><link>https://devzone.nordicsemi.com/thread/535873?ContentTypeID=1</link><pubDate>Sun, 18 May 2025 11:20:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:004f746d-8e21-4a27-92cb-1d836e328ccb</guid><dc:creator>Lucas Heitele</dc:creator><description>&lt;p class="" data-start="166" data-end="175"&gt;Hi H&amp;aring;kon,&lt;/p&gt;
&lt;p class="" data-start="177" data-end="202"&gt;thank you for your reply!&lt;/p&gt;
&lt;p class="" data-start="204" data-end="304"&gt;I&amp;rsquo;ve double-checked the key size topic and already enabled support for RSA-4096 in my configuration:&lt;/p&gt;
&lt;p class="" data-start="204" data-end="304"&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_NRF_SECURITY=y
CONFIG_MBEDTLS=y
CONFIG_MBEDTLS_RSA_C=y
CONFIG_MBEDTLS_TLS_LIBRARY=y
CONFIG_PSA_WANT_RSA_KEY_SIZE_4096=y
CONFIG_PSA_WANT_ALG_RSA_PKCS1V15_SIGN=y
CONFIG_PSA_WANT_ALG_RSA_PKCS1V15_CRYPT=y
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_ENABLED=y
CONFIG_MBEDTLS_PKCS1_V15=y
CONFIG_MBEDTLS_X509_CRT_PARSE_C=y
CONFIG_MBEDTLS_X509_CRL_PARSE_C=y
CONFIG_MBEDTLS_X509_CSR_PARSE_C=y&lt;/pre&gt;&lt;/p&gt;
&lt;p class="" data-start="607" data-end="880"&gt;Despite that, provisioning &lt;strong data-start="634" data-end="642"&gt;only&lt;/strong&gt; ISRG Root X1 (RSA 4096) via &lt;code data-start="671" data-end="732"&gt;tls_credential_add(..., TLS_CREDENTIAL_CA_CERTIFICATE, ...)&lt;/code&gt; still leads to a failed TLS handshake (&lt;code data-start="772" data-end="782"&gt;errno 22&lt;/code&gt;).&lt;/p&gt;
&lt;p class="" data-start="1270" data-end="1485"&gt;To answer your request:&lt;br data-start="1293" data-end="1296" /&gt; I&amp;#39;m connecting to &lt;code data-start="1314" data-end="1333"&gt;api.eversion.tech&lt;/code&gt;, which uses a Let&amp;#39;s Encrypt certificate issued by R11 and chains to ISRG Root X1. You can reproduce the behavior with any server using a similar chain.&lt;/p&gt;
&lt;p class="" data-start="1668" data-end="1689"&gt;Best regards,&lt;br data-start="1681" data-end="1684" /&gt; Lucas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: TLS chain validation issue with ISRG Root X1 on nRF7002 using Zephyr</title><link>https://devzone.nordicsemi.com/thread/535577?ContentTypeID=1</link><pubDate>Thu, 15 May 2025 12:27:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d832db1-c39c-45e8-8a45-6a0bbcccdbff</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I suspect the issue is due to ISRG Root X1 being a RSA-4096 certificate, and the R11 being RSA 2048.&lt;/p&gt;
&lt;p&gt;Could you try the configs mentioned here:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/116411/nrf7002dk-https-request-failed-with-errno-22/510973"&gt;RE: [nRF7002DK] HTTPS request Failed with errno: 22&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And if it still fails, please let me know about which domain you&amp;#39;re trying to connect to and I&amp;#39;ll see if I can recreate and debug the issue locally.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>