<?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>DTLS Session Resumption on nRF9160, modem FW v1.1.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55335/dtls-session-resumption-on-nrf9160-modem-fw-v1-1-0</link><description>I am using built-in DTLS for encrypting my UDP traffic. In order to save expensive data quota and reduce battery drain, I have to make use of session resumption, so that I do not have to perform the full handshake each time I connect to the server. The</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 13 Dec 2019 14:06:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55335/dtls-session-resumption-on-nrf9160-modem-fw-v1-1-0" /><item><title>RE: DTLS Session Resumption on nRF9160, modem FW v1.1.0</title><link>https://devzone.nordicsemi.com/thread/225392?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2019 14:06:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e22a252-3001-416f-93f1-a9bc9f61ab97</guid><dc:creator>Marcus_S</dc:creator><description>&lt;p&gt;OK, thank you for clarifying this!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTLS Session Resumption on nRF9160, modem FW v1.1.0</title><link>https://devzone.nordicsemi.com/thread/225373?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2019 13:22:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9b2ce98-9b6b-43ac-b3f0-e70973022fe5</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;My apologies for the late answer, it took a bit longer than expected to find who worked on this specific feature internally.&lt;/p&gt;
&lt;p&gt;I have been reaching out internally to the teams working on the net stack, and unfortunately gotten this confirmed; session cache is not fully implemented in bsdlib.&lt;/p&gt;
&lt;p&gt;I have also requested that this is to be documented in bsdlib.&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: DTLS Session Resumption on nRF9160, modem FW v1.1.0</title><link>https://devzone.nordicsemi.com/thread/225110?ContentTypeID=1</link><pubDate>Thu, 12 Dec 2019 09:49:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9ab19d1-6529-4430-ad4a-90de3c43390d</guid><dc:creator>Marcus_S</dc:creator><description>&lt;p&gt;Sorry, that was an error in my previous post, which I thought I have edited, but the edit does not show... Anyway, actually I am using &lt;span style="background-color:#ffffff;"&gt;nrf_sec_session_cache_t used in the struct nrf_sec_config_t&lt;/span&gt;&lt;span style="background-color:#ffffff;"&gt;, and I am also checking the error code:&lt;/span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;nrf_sec_config.session_cache = 0; // 0=enabled!
...
if (nrf_setsockopt(dtlsSocket, NRF_SOL_SECURE, NRF_SO_SEC_SESSION_CACHE, &amp;amp;nrf_sec_config.session_cache, sizeof(nrf_sec_config.session_cache)) &amp;lt; 0)
{
    LOG_ERR(&amp;quot;setsockopt NRF_SO_SEC_SESSION_CACHE: %d&amp;quot;, errno);
    nrf_close(dtlsSocket);
    dtlsSocket = -1;
    return false;
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTLS Session Resumption on nRF9160, modem FW v1.1.0</title><link>https://devzone.nordicsemi.com/thread/225104?ContentTypeID=1</link><pubDate>Thu, 12 Dec 2019 09:34:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:622f09c4-059b-422e-8af6-30e6f3862b33</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;The type it takes in is &amp;quot;nrf_sec_session_cache_t&amp;quot;, which is a uint8_t. passing a int shall give an err return.&lt;/p&gt;
&lt;p&gt;Could you try passing this type? Remember to always check the return code.&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: DTLS Session Resumption on nRF9160, modem FW v1.1.0</title><link>https://devzone.nordicsemi.com/thread/224744?ContentTypeID=1</link><pubDate>Tue, 10 Dec 2019 13:11:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce4e19d3-9a13-43a3-864a-de573741bac9</guid><dc:creator>Marcus_S</dc:creator><description>&lt;p&gt;OK, this is what I do, but it doesn&amp;#39;t work. I always get an empty session ID in the Client Hello messages.&lt;/p&gt;
&lt;p&gt;Does the nRF9160 support session IDs and session tickets, or only one of the two?&lt;/p&gt;
&lt;p&gt;How long does it cache a session? Can this timeout be configured?&lt;/p&gt;
&lt;p&gt;Is there any documentation on nRF9160 TLS/DTLS capability?&lt;/p&gt;
&lt;p&gt;BTW, in my code above I forgot to post the SEC_SESSION_CACHE option:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;int session_cache = 0; // 0=enabled!
nrf_setsockopt(dtlsSocket, NRF_SOL_SECURE, NRF_SO_SEC_SESSION_CACHE, &amp;amp;session_cache, sizeof(session_cache));
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DTLS Session Resumption on nRF9160, modem FW v1.1.0</title><link>https://devzone.nordicsemi.com/thread/224471?ContentTypeID=1</link><pubDate>Mon, 09 Dec 2019 13:46:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79aa3271-dc46-4a30-96d5-715d535db13e</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;For this specific SO_SEC option, it seems that the offloading does not handle it:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/lib/bsdlib/nrf91_sockets.c#L110"&gt;https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/lib/bsdlib/nrf91_sockets.c#L110&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;the offloading API in zephyr does not have a SEC_SESSION_CACHE defined, so the nrf91_sockets.c cannot handle it properly from an offloading point-of-view. The &amp;quot;&lt;span&gt;NRF_SO_SEC_SESSION_CACHE&amp;quot; must be set using nrf_setsockopt() directly at this time, unfortunately. I&amp;#39;ll make the developers aware of this issue.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&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;Håkon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>