<?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>nRF9160 ssl tls https websocket connections</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70783/nrf9160-ssl-tls-https-websocket-connections</link><description>I am working on a project now that will be performing ssl based http or websocket connections to a server. 
 I have looked around a little and seen some documentation and under the impression that certificates need to first be uploaded into the nRF9160</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 Jan 2021 13:00:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70783/nrf9160-ssl-tls-https-websocket-connections" /><item><title>RE: nRF9160 ssl tls https websocket connections</title><link>https://devzone.nordicsemi.com/thread/290750?ContentTypeID=1</link><pubDate>Fri, 22 Jan 2021 13:00:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:074574eb-b2d1-4b14-99e5-ee1ca98e80b8</guid><dc:creator>aldras</dc:creator><description>&lt;p&gt;Hi Didrik,&lt;/p&gt;
&lt;p&gt;Thank you very much for the detailed answer, this has given me insight to the questions and given me something to think about.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160 ssl tls https websocket connections</title><link>https://devzone.nordicsemi.com/thread/290747?ContentTypeID=1</link><pubDate>Fri, 22 Jan 2021 12:55:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b4e9fc7-3b6e-4eca-b0ce-8709e3cc64c7</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]How does the nRF9160 compare, does it have some hardware to accelerate cryptography to some degree?[/quote]
&lt;p&gt;&amp;nbsp;Yes, the nRF9160 has some hardware cryptography modules. Both in the modem and on the application core.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf9160/cryptocell.html"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf9160/cryptocell.html&lt;/a&gt; &lt;/p&gt;
[quote user=""] is it possible to create this root CA store in the nRF9160 to handle the CA verification?[/quote]
&lt;p&gt;&amp;nbsp;The IP, TCP (and UDP), TLS (and DTLS) stacks are normally offloaded to the modem. In that case, the certificates must also be stored in the modem. You do that with the &lt;a href="https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/mob_termination_ctrl_status/cmng.html"&gt;%CMNG AT command.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;The certificates are written to a &amp;quot;sec_tag&amp;quot;, and when you open a socket, you can instruct the modem to use the certificates stored in a given sec_tag.&lt;/p&gt;
[quote user=""]Currently I am working with the &amp;quot;serial lte modem&amp;quot; example and would prefer if there was TLS support in this project, but it appears it is either limited or does not exist presently.[/quote]
&lt;p&gt;&amp;nbsp;TLS is supported both for the HTTP commands, and the TCP commands. In both cases, you enable TLS by adding the sec_tag to the command.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.2/nrf/applications/serial_lte_modem/doc/TCPIP_AT_commands.html#bsd-socket-xsocket"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.2/nrf/applications/serial_lte_modem/doc/TCPIP_AT_commands.html#bsd-socket-xsocket&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.2/nrf/applications/serial_lte_modem/doc/HTTPC_AT_commands.html#http-client-connection-xhttpccon"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.2/nrf/applications/serial_lte_modem/doc/HTTPC_AT_commands.html#http-client-connection-xhttpccon&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If the TLS stack on the modem isn&amp;#39;t enough, or you would like to configure the TLS stack differently, the SLM also supports having the TLS stack on the application core when using the TCP commands (it will not use the application core TLS stack when using HTTP or MQTT commands). You can use the application core TLS stack by setting CONFIG_SLM_NATIVE_TLS=y in your prj.conf.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.2/nrf/applications/serial_lte_modem/doc/slm_description.html#native-tls-sockets"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.2/nrf/applications/serial_lte_modem/doc/slm_description.html#native-tls-sockets&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""]With the SAM51 I would store the root CAs on an SD card. &amp;nbsp;Attaching an SD card to the nRF9160 through SPI I guess would not be impossible, but then the necessary code would have to be written to handle the implementation.[/quote]
&lt;p&gt;Unless you want to keep the certificates away from the SAM51, it will probably be easiest to connect the SD card to the SAM51, and send the certificates over the AT command interface to the nRF9160.&lt;/p&gt;
&lt;p&gt;It shouldn&amp;#39;t be too hard to modify the SLM to read the certificates from the SD card, but it does sound like more work.&lt;/p&gt;
&lt;p&gt;If you want to read the SD card from the nRF9160: &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.2/zephyr/reference/storage/disk/sdhc.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.2/zephyr/reference/storage/disk/sdhc.html&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;Best regards,&lt;/p&gt;
&lt;p&gt;Didrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>