<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>i.MX Processors中的主题 Re: Zephyr echo_client sample and openssl server- certification failure.</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Zephyr-echo-client-sample-and-openssl-server-certification/m-p/1500441#M193403</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/198126"&gt;@gronoarona&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;We recommend posting Zephyr questions like this in Zephyr's GitHub, see&amp;nbsp;&lt;A href="https://community.nxp.com/t5/Zephyr-Project/bd-p/Zephyr-Project" target="_self"&gt;Zephyr NXP Support &lt;/A&gt;for more details.&amp;nbsp; Looking through this, the issue does not seem specific to NXP hardware, but is a general Zephyr Networking question.&amp;nbsp; So if you post in &lt;A href="https://github.com/zephyrproject-rtos/zephyr/discussions" target="_self"&gt;Zephyrs GitHub Discussions&lt;/A&gt;, others in the Zephyr Community who know the Networking stack can provide some support.&lt;/P&gt;
&lt;P&gt;BTW, I found you also posted this issue on &lt;A href="https://devzone.nordicsemi.com/f/nordic-q-a/90656/zephyr-echo_client-sample-and-openssl-server--certification-failure" target="_self"&gt;Nordic's forums&lt;/A&gt;?&lt;/P&gt;</description>
    <pubDate>Wed, 03 Aug 2022 18:07:05 GMT</pubDate>
    <dc:creator>dereksnell</dc:creator>
    <dc:date>2022-08-03T18:07:05Z</dc:date>
    <item>
      <title>Zephyr echo_client sample and openssl server- certification failure.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Zephyr-echo-client-sample-and-openssl-server-certification/m-p/1500091#M193373</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to setup TLS communication using UDP, betwen:&lt;/P&gt;&lt;P&gt;- mimxrt1060-ekvb as client&lt;/P&gt;&lt;P&gt;- ubuntu pc, openssl server as server (ofc)&lt;/P&gt;&lt;P&gt;I modify prj.conf of sample disabling all TCP and IPv6:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;# Generic networking options
CONFIG_NETWORKING=y
CONFIG_NET_UDP=y
CONFIG_NET_TCP=n
CONFIG_NET_IPV6=n
CONFIG_NET_IPV4=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_POSIX_NAMES=y
CONFIG_NET_SOCKETS_POLL_MAX=4
CONFIG_NET_CONNECTION_MANAGER=y

# Kernel options
CONFIG_MAIN_STACK_SIZE=2048
CONFIG_ENTROPY_GENERATOR=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_INIT_STACKS=y
CONFIG_DEBUG=y
# Logging
CONFIG_NET_LOG=y
CONFIG_LOG=y
CONFIG_NET_STATISTICS=y
CONFIG_PRINTK=y

# Network buffers
CONFIG_NET_PKT_RX_COUNT=16
CONFIG_NET_PKT_TX_COUNT=16
CONFIG_NET_BUF_RX_COUNT=80
CONFIG_NET_BUF_TX_COUNT=80
CONFIG_NET_CONTEXT_NET_PKT_POOL=y

# IP address options
# CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=3
# CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=4
CONFIG_NET_MAX_CONTEXTS=10

# Network shell
CONFIG_NET_SHELL=y

# The addresses are selected so that qemu&amp;lt;-&amp;gt;qemu connectivity works ok.
# For linux&amp;lt;-&amp;gt;qemu connectivity, create a new conf file and swap the
# addresses (so that peer address is ending to 2).
CONFIG_NET_CONFIG_SETTINGS=y
# CONFIG_NET_CONFIG_NEED_IPV6=y
# CONFIG_NET_CONFIG_MY_IPV6_ADDR="2001:db8::2"
# CONFIG_NET_CONFIG_PEER_IPV6_ADDR="2001:db8::1"
CONFIG_NET_CONFIG_NEED_IPV4=y
CONFIG_NET_CONFIG_MY_IPV4_ADDR="192.168.1.225"
CONFIG_NET_CONFIG_PEER_IPV4_ADDR="192.168.1.240"
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To build i using command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;west build -p always -b mimxrt1060_evkb -s samples/net/sockets/echo_client -- -DCONF_FILE="prj.conf overlay-tls.conf"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On server site, running openssl server by:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;openssl s_server -key ssl_keys/echo-apps-key.der -cert ssl_keys/echo-apps-cert.der -dtls1_2 -accept 4242 -certform DER&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where is the problem:&lt;/P&gt;&lt;P&gt;Zephyr application running on uP tries to connect to ssl server but it fails, returning error log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;err&amp;gt; net_sock_tls: TLS handshake error: -2700&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On server side i got log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Using default temp DH parameters
ACCEPT
ERROR
80CB36578F7F0000:error:0A000412:SSL routines:dtls1_read_bytes:sslv3 alert bad certificate:../ssl/record/rec_layer_d1.c:613:SSL alert number 42
shutting down SSL
CONNECTION CLOSED&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On wireshark there is also the same information&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;26255	343.215228125	192.168.1.225	192.168.1.240	DTLSv1.2	62	Alert (Level: Fatal, Description: Bad Certificate)&lt;/LI-CODE&gt;&lt;P&gt;I think the problem in configuration, but i can't find where.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cert and key files i took from echo_server sample, but if i regenerate them by my self, the result is the same.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 08:22:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Zephyr-echo-client-sample-and-openssl-server-certification/m-p/1500091#M193373</guid>
      <dc:creator>gronoarona</dc:creator>
      <dc:date>2022-08-03T08:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: Zephyr echo_client sample and openssl server- certification failure.</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Zephyr-echo-client-sample-and-openssl-server-certification/m-p/1500441#M193403</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/198126"&gt;@gronoarona&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;We recommend posting Zephyr questions like this in Zephyr's GitHub, see&amp;nbsp;&lt;A href="https://community.nxp.com/t5/Zephyr-Project/bd-p/Zephyr-Project" target="_self"&gt;Zephyr NXP Support &lt;/A&gt;for more details.&amp;nbsp; Looking through this, the issue does not seem specific to NXP hardware, but is a general Zephyr Networking question.&amp;nbsp; So if you post in &lt;A href="https://github.com/zephyrproject-rtos/zephyr/discussions" target="_self"&gt;Zephyrs GitHub Discussions&lt;/A&gt;, others in the Zephyr Community who know the Networking stack can provide some support.&lt;/P&gt;
&lt;P&gt;BTW, I found you also posted this issue on &lt;A href="https://devzone.nordicsemi.com/f/nordic-q-a/90656/zephyr-echo_client-sample-and-openssl-server--certification-failure" target="_self"&gt;Nordic's forums&lt;/A&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 18:07:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Zephyr-echo-client-sample-and-openssl-server-certification/m-p/1500441#M193403</guid>
      <dc:creator>dereksnell</dc:creator>
      <dc:date>2022-08-03T18:07:05Z</dc:date>
    </item>
  </channel>
</rss>

