<?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>MQTTS Custom CERTs</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105898/mqtts-custom-certs</link><description>Hi, 
 I have been working with the nrf7002DK, I have a situation: 
 I have properly implemented Wi-Fi STA and MQTT over TLS. I want to update few things and would need your support. 
 1. In nrf7002DK overlay.conf, the certificate credentials are automatically</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 04 Dec 2023 11:05:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105898/mqtts-custom-certs" /><item><title>RE: MQTTS Custom CERTs</title><link>https://devzone.nordicsemi.com/thread/458708?ContentTypeID=1</link><pubDate>Mon, 04 Dec 2023 11:05:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11c7552f-c569-45bc-a47a-e7c68f6fc3e9</guid><dc:creator>LalithRJ</dc:creator><description>&lt;p&gt;Hi Simonr! I was able to provision the tls certificates using the &lt;strong&gt;tls_credential_add().&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Lalith RJ&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTTS Custom CERTs</title><link>https://devzone.nordicsemi.com/thread/457363?ContentTypeID=1</link><pubDate>Fri, 24 Nov 2023 14:49:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d6e5d6f-c429-4937-83a7-4f3e1c66d54a</guid><dc:creator>LalithRJ</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks Simon, I&amp;#39;ll work on it and once I get a success state I&amp;#39;ll Update!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTTS Custom CERTs</title><link>https://devzone.nordicsemi.com/thread/457314?ContentTypeID=1</link><pubDate>Fri, 24 Nov 2023 12:17:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9837b95-f837-4a49-b0b5-db15102944a9</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Is there a specific reason you want to get the MQTTS certificates from NVS instead of automatically?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want to do this manually, you can &amp;quot;borrow&amp;quot; the&amp;nbsp;&lt;strong&gt;certificates_provision()&amp;nbsp;&lt;/strong&gt;function from the mqtt_helper.c and use that to find another way to get the certificates.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Alternatively you can &amp;quot;invent the wheel&amp;quot; yourself, by creating a function where you load certificates into a buffer, then call &lt;strong&gt;tls_credential_add&lt;/strong&gt; to put use your credentials.&lt;/p&gt;
&lt;p&gt;We don&amp;#39;t have an exact way to get them manually, so you&amp;#39;ll need to do&amp;nbsp;&lt;strong&gt;some&amp;nbsp;&lt;/strong&gt;tweaking on your end.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTTS Custom CERTs</title><link>https://devzone.nordicsemi.com/thread/457057?ContentTypeID=1</link><pubDate>Thu, 23 Nov 2023 04:23:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a524727d-c98a-437f-a9f2-6d7a28963520</guid><dc:creator>LalithRJ</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
[quote userid="125155" url="~/f/nordic-q-a/105898/mqtts-custom-certs"]1. In nrf7002DK overlay.conf, the certificate credentials are automatically provisioned, but I would want to read the credentials from a different location.[/quote]
&lt;p&gt;I meant the MQTTS certificates (ca certificate, client certificate and private certificate), I want to statically put the contents of the certs in the code instead of it automatically taking from a location.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1700712988117v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I want to do something like this,&lt;br /&gt;&lt;span class="hljs-type"&gt;const&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span class="hljs-type"&gt;char&lt;/span&gt;&lt;span&gt; *certificateContent = &lt;/span&gt;&lt;span class="hljs-string"&gt;&amp;quot;-----BEGIN CERTIFICATE-----\n&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;nbsp;/**CONTENTS**/&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="hljs-string"&gt;&amp;quot;-----END CERTIFICATE-----&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What I observe is, I have the certificate Contents stored in a memory(NVS) but in the sample the certificate is provisioned in the the mqtt_helper.c where I am not able to put my nvs contents!! I dont feel editing the library files.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Do we have a way to do achieve what I need.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Let me know if you have any doubts in the question and Kindly respond in the earliest.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Lalith RJ&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTTS Custom CERTs</title><link>https://devzone.nordicsemi.com/thread/456840?ContentTypeID=1</link><pubDate>Wed, 22 Nov 2023 09:14:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65fff11a-46e5-4a75-95ae-dd10af573ba5</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;1. I assume you&amp;#39;re referring to the wifi credentials here, right? The &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/networking/wifi_credentials.html#lib-wifi-credentials"&gt;wifi credentials library&lt;/a&gt;&amp;nbsp;have an option to use the PSA storage instead of the settings backend I believe is the default.&lt;/p&gt;
&lt;p&gt;2. In terms of sockets there shouldn&amp;#39;t be an issue setting up both MQTT and MQTTS (with and without TLS). But the sample is somewhat static and you would need to implement this yourself if you want to enable/disable TLS in runtime. You can&amp;#39;t change the .conf file itself but it&amp;#39;s possible to enable and disable the TLS library and functions if you&amp;#39;d like.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>