<?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>CoAP Secure CLI Example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96620/coap-secure-cli-example</link><description>Hi, 
 I&amp;#39;m running into some issues testing the CoAP Secure (CoAPS) functionality on the nRF &amp;quot; Thread: CLI&amp;quot; example &amp;quot;. I have attempted to use both pre-shared key (pskc) and the default x509 certificate as authentication types, but both are producing errors</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Apr 2023 14:34:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96620/coap-secure-cli-example" /><item><title>RE: CoAP Secure CLI Example</title><link>https://devzone.nordicsemi.com/thread/422794?ContentTypeID=1</link><pubDate>Thu, 27 Apr 2023 14:34:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df72cfee-1571-4fa1-8db9-5b6a4c5f2a65</guid><dc:creator>hugzy123</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Thanks for the update. We&amp;#39;re using authentication with PSK instead for now, we&amp;#39;ll migrate to using certificates when there&amp;#39;s a full solution available in the future.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP Secure CLI Example</title><link>https://devzone.nordicsemi.com/thread/421787?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 13:51:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72e0aa9f-34c7-4b0f-9c74-598f28dbdd08</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Here is a workaround for now:&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;The original error is a tls handshake failure caused by selection of incorrect ciphersuite by the server (MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8 instead of MBEDTLS_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8).&lt;/p&gt;
&lt;p&gt;It&amp;#39;s possible to make x509 usable by disabling ECJPAKE ciphersuite (CONFIG_MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED=n) and raising mbedtls heap size (CONFIG_MBEDTLS_HEAP_SIZE=15200) - disabling ECJPAKE will result in openthread compilation error, as some files stop being included, which results in undeclared symbols. This can be solved by #ifdef guarding erroneous lines.&lt;/p&gt;
&lt;p&gt;This, however, is a workaround - openthread relies on ECJPAKE for some functionalities (like commissioning). Those functionalities will fail after disabling the ciphersuite.&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP Secure CLI Example</title><link>https://devzone.nordicsemi.com/thread/418971?ContentTypeID=1</link><pubDate>Tue, 04 Apr 2023 08:22:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63e08c13-a4fe-4bfd-b7a4-a11cc9cfb3e9</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Here is an update:&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;The issue is not solved yet, but we&amp;#39;re getting closer.&lt;/p&gt;
&lt;p&gt;One thing that should be done is setting hostname of the server device. Cli sample&amp;#39;s default certificate has Common Name set as &amp;quot;PXC3.E75-100A&amp;quot;, which is the expected hostname of a device using it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Another discovered issue is that the ciphersuite used by the cli app by default is untested and not recommended. Disabling MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED config and setting MBEDTLS_SSL_CIPHERSUITES to ECDHE_ECDSA_WITH_AES_128_CCM8 fixes one of the issues.&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP Secure CLI Example</title><link>https://devzone.nordicsemi.com/thread/413724?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2023 08:26:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bef47cb-e402-423b-b5ab-67cd7a8d2755</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;I polled our developers on this, and they said:&lt;/p&gt;
&lt;p&gt;This is under investigation by one of the engineers. He was able to confirm the issue but hasn&amp;#39;t found the root cause yet.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP Secure CLI Example</title><link>https://devzone.nordicsemi.com/thread/412988?ContentTypeID=1</link><pubDate>Thu, 02 Mar 2023 11:45:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c1829eb-4a57-4341-8e1a-b6a1655a7b84</guid><dc:creator>hugzy123</dc:creator><description>&lt;p&gt;OK thanks for looking into it&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP Secure CLI Example</title><link>https://devzone.nordicsemi.com/thread/412547?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 14:14:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb55b08a-6789-438a-a218-7beac625904f</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;We have had the same issue reported by another cusomer as well.&lt;/p&gt;
&lt;p&gt;Our developers have started to look into this, but I have not gotten any answers yet.&lt;/p&gt;
&lt;p&gt;I will keep you updated.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP Secure CLI Example</title><link>https://devzone.nordicsemi.com/thread/411405?ContentTypeID=1</link><pubDate>Wed, 22 Feb 2023 14:20:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f257c08-aa4c-438f-8a21-7c2d18875270</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Due to nRF Connect SDK v2.3.0 being released soon, it will take longer than usual to get back to this answer.&lt;/p&gt;
&lt;p&gt;I hope that we will get an answer by Monday.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP Secure CLI Example</title><link>https://devzone.nordicsemi.com/thread/411138?ContentTypeID=1</link><pubDate>Tue, 21 Feb 2023 14:10:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d1cc51c-9b20-462b-96b7-3b95788cb004</guid><dc:creator>hugzy123</dc:creator><description>&lt;p&gt;OK thanks.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP Secure CLI Example</title><link>https://devzone.nordicsemi.com/thread/411131?ContentTypeID=1</link><pubDate>Tue, 21 Feb 2023 13:51:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4d9ac2d-2d10-4c64-b9cd-8eab38f8870b</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Today I gave it another try but could not find the correct configuration for x509.&lt;br /&gt;From &lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;&lt;a title="https://datatracker.ietf.org/doc/html/rfc7252#section-9.1.3.3" href="https://datatracker.ietf.org/doc/html/rfc7252#section-9.1.3.3" rel="noopener noreferrer" target="_blank"&gt;RFC7252: X.509 Certificates&lt;/a&gt;, I think it should be &lt;a title="https://developer.nordicsemi.com/nrf_connect_sdk/doc/latest/kconfig/index.html#config_mbedtls_key_exchange_ecdhe_ecdsa_enabled" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED" rel="noopener noreferrer" target="_blank"&gt;CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED&lt;/a&gt;.&lt;br /&gt;But no luck.&lt;/p&gt;
&lt;p&gt;So I have asked our Thread developers for assistance with this.&lt;br /&gt;I will let you know as soon as I hear back from them.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP Secure CLI Example</title><link>https://devzone.nordicsemi.com/thread/410679?ContentTypeID=1</link><pubDate>Fri, 17 Feb 2023 14:31:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0942245a-9183-4264-8f73-6f73e63f7eda</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;I have unfortunately not been able to figure this out today.&lt;/p&gt;
&lt;p&gt;But I will continue to look into it on Monday.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP Secure CLI Example</title><link>https://devzone.nordicsemi.com/thread/410449?ContentTypeID=1</link><pubDate>Thu, 16 Feb 2023 16:36:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:033342e0-ed32-434a-8923-3f6083ab562e</guid><dc:creator>hugzy123</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for the quick reply.&lt;/p&gt;
&lt;p&gt;I tried your suggestion but no luck unfortunately, it still&amp;nbsp;won&amp;#39;t connect. One interesting&amp;nbsp;thing I noticed was the coaps connect command with certificate authentication type only&amp;nbsp;triggers on the v2.1.0 sdk. On the v2.2.0 sdk the command fails with error &amp;quot;InvalidArgs&amp;quot; every time, even with&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_MBEDTLS_KEY_EXCHANGE_ALL_ENABLED"&gt;CONFIG_MBEDTLS_KEY_EXCHANGE_ALL_ENABLED&lt;/a&gt;. I&amp;#39;m guessing there must some differences in the kconfig of the CLI example between v2.1.0 and v2.2.0.&lt;/p&gt;
&lt;p&gt;Is there any other suggestions you recommend?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP Secure CLI Example</title><link>https://devzone.nordicsemi.com/thread/409988?ContentTypeID=1</link><pubDate>Wed, 15 Feb 2023 07:33:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a04febc2-000c-4c64-8d1e-ad0dedc92af0</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="hugzy123"]I&amp;#39;ve managed to get the psk authentication type working by setting&amp;nbsp;CONFIG_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED in the kconfig.[/quote]
&lt;p&gt;Good job!&lt;/p&gt;
[quote user="hugzy123"]However, i&amp;#39;m still having issues with the x509 certificate based authentication. Is there an equivalent I should set in the kconfig to get the x509 type working?[/quote]
&lt;p&gt;I do not know for sure which configuration it would be now.&lt;br /&gt;But to test, I searched for the following:&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/pastedimage1676446300205v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;To check if it is any key exchange configuration, try with &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_MBEDTLS_KEY_EXCHANGE_ALL_ENABLED"&gt;CONFIG_MBEDTLS_KEY_EXCHANGE_ALL_ENABLED&lt;/a&gt;.&lt;br /&gt;Does x509 work with this?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP Secure CLI Example</title><link>https://devzone.nordicsemi.com/thread/409936?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 17:38:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb03e6ab-6c10-47f4-9211-a39b109a4a87</guid><dc:creator>hugzy123</dc:creator><description>&lt;p&gt;Thanks for looking into this.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve managed to get the psk authentication type working by setting&amp;nbsp;CONFIG_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED in the kconfig. However, i&amp;#39;m still having issues with the x509 certificate based authentication. Is there an equivalent I should set in the kconfig to get the x509 type working?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CoAP Secure CLI Example</title><link>https://devzone.nordicsemi.com/thread/409920?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2023 15:55:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e6a9c70-0028-401f-810d-f92d4d918510</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I will look into this and return with more information tomorrow.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>