<?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>topic NanoSSL memory allocation problem in Processor Expert Software</title>
    <link>https://community.nxp.com/t5/Processor-Expert-Software/NanoSSL-memory-allocation-problem/m-p/221072#M1017</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to integrate Mocana NanoSSL into a project (CW10.0, MQX 3.6.2, MCF52255) and I tried to run a shell command (mss_ssl_client_cmd) that was included with some demo code.&amp;nbsp; The output is below, but essentially it seems to work fine up to the ASN1_Parse command, where it returns with a -6101 (ERR_MEM_ALLOC_FAIL) error.&amp;nbsp; Based on the reported line number I believe the problem is occurring at the MALLOC in TREE_MakeNewTreeItem() in the tree.c file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas what is causing this error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Connecting to&amp;nbsp;&amp;nbsp; [209.132.180.195: 443]&lt;/P&gt;&lt;P&gt;MOCANA_initLog()&lt;/P&gt;&lt;P&gt;LOG_OUTPUT: MSS WARNING NOT A PRODUCTION BUILD: MOCANA DEBUG CONSOLE HAS BEEN ENABLED.&lt;/P&gt;&lt;P&gt;SSL_init()&lt;/P&gt;&lt;P&gt;SSL_init: completed after = ( (0.70)) milliseconds.&lt;/P&gt;&lt;P&gt;mss_ssl_ca_mgmt_init_upcalls()&lt;/P&gt;&lt;P&gt;mss_rtcs_connect_socket()&lt;/P&gt;&lt;P&gt;SSL_connect()&lt;/P&gt;&lt;P&gt;LOG_OUTPUT: SSL INFO SSL client made connection.&lt;/P&gt;&lt;P&gt;SSL_negotiateConnection()&lt;/P&gt;&lt;P&gt;Handshake length = 57&lt;/P&gt;&lt;P&gt; (CLIENT) Client Hello&lt;/P&gt;&lt;P&gt;01 00 00 35 03 01 94 56 51 06 31 28 5a 82 0b 68&lt;/P&gt;&lt;P&gt;5d 4b ca 80 1d f2 a5 9d 50 e7 c7 32 14 0a cd a9&lt;/P&gt;&lt;P&gt;20 f9 35 49 ff c4 00 00 0e 00 2f 00 3c 00 35 00&lt;/P&gt;&lt;P&gt;3d 00 04 00 05 00 0a 01 00&lt;/P&gt;&lt;P&gt;Handshake length = 74&lt;/P&gt;&lt;P&gt; (CLIENT) Server hello&lt;/P&gt;&lt;P&gt;02 00 00 46 03 01 00 03 d4 2e 47 e1 63 fd 36 27&lt;/P&gt;&lt;P&gt;4e c3 20 1a ff e2 26 54 9d 89 30 8f be 76 45 96&lt;/P&gt;&lt;P&gt;dc fa a2 e1 a3 19 20 63 c9 2b c5 6f a5 9d 6f 86&lt;/P&gt;&lt;P&gt;5e 21 6a a4 02 a1 18 7c 3c f2 db 71 22 dd b0 d5&lt;/P&gt;&lt;P&gt;2a ce 11 d7 08 9c a4 00 04 00&lt;/P&gt;&lt;P&gt;ASN1_Parse() returns status = -6101&lt;/P&gt;&lt;P&gt;ASN1_Parse() @ line # 4651&lt;/P&gt;&lt;P&gt;handleClientHandshakeMessages() returns status = -6101&lt;/P&gt;&lt;P&gt;SSL_SOCK_receive() returns status = -6101&lt;/P&gt;&lt;P&gt;SSL:doProtocol() returns status = -6101&lt;/P&gt;&lt;P&gt;SSL_negotiateConnection() returns status = -6101&lt;/P&gt;&lt;P&gt;SSL negotiation is failed!&lt;/P&gt;&lt;P&gt;LOG_OUTPUT: SSL INFO SSL stack shutting down.&lt;/P&gt;&lt;P&gt;Connection failed&lt;/P&gt;&lt;P&gt;Connection closed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 06 Jan 2013 09:08:30 GMT</pubDate>
    <dc:creator>ARQuattr</dc:creator>
    <dc:date>2013-01-06T09:08:30Z</dc:date>
    <item>
      <title>NanoSSL memory allocation problem</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/NanoSSL-memory-allocation-problem/m-p/221072#M1017</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to integrate Mocana NanoSSL into a project (CW10.0, MQX 3.6.2, MCF52255) and I tried to run a shell command (mss_ssl_client_cmd) that was included with some demo code.&amp;nbsp; The output is below, but essentially it seems to work fine up to the ASN1_Parse command, where it returns with a -6101 (ERR_MEM_ALLOC_FAIL) error.&amp;nbsp; Based on the reported line number I believe the problem is occurring at the MALLOC in TREE_MakeNewTreeItem() in the tree.c file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas what is causing this error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Connecting to&amp;nbsp;&amp;nbsp; [209.132.180.195: 443]&lt;/P&gt;&lt;P&gt;MOCANA_initLog()&lt;/P&gt;&lt;P&gt;LOG_OUTPUT: MSS WARNING NOT A PRODUCTION BUILD: MOCANA DEBUG CONSOLE HAS BEEN ENABLED.&lt;/P&gt;&lt;P&gt;SSL_init()&lt;/P&gt;&lt;P&gt;SSL_init: completed after = ( (0.70)) milliseconds.&lt;/P&gt;&lt;P&gt;mss_ssl_ca_mgmt_init_upcalls()&lt;/P&gt;&lt;P&gt;mss_rtcs_connect_socket()&lt;/P&gt;&lt;P&gt;SSL_connect()&lt;/P&gt;&lt;P&gt;LOG_OUTPUT: SSL INFO SSL client made connection.&lt;/P&gt;&lt;P&gt;SSL_negotiateConnection()&lt;/P&gt;&lt;P&gt;Handshake length = 57&lt;/P&gt;&lt;P&gt; (CLIENT) Client Hello&lt;/P&gt;&lt;P&gt;01 00 00 35 03 01 94 56 51 06 31 28 5a 82 0b 68&lt;/P&gt;&lt;P&gt;5d 4b ca 80 1d f2 a5 9d 50 e7 c7 32 14 0a cd a9&lt;/P&gt;&lt;P&gt;20 f9 35 49 ff c4 00 00 0e 00 2f 00 3c 00 35 00&lt;/P&gt;&lt;P&gt;3d 00 04 00 05 00 0a 01 00&lt;/P&gt;&lt;P&gt;Handshake length = 74&lt;/P&gt;&lt;P&gt; (CLIENT) Server hello&lt;/P&gt;&lt;P&gt;02 00 00 46 03 01 00 03 d4 2e 47 e1 63 fd 36 27&lt;/P&gt;&lt;P&gt;4e c3 20 1a ff e2 26 54 9d 89 30 8f be 76 45 96&lt;/P&gt;&lt;P&gt;dc fa a2 e1 a3 19 20 63 c9 2b c5 6f a5 9d 6f 86&lt;/P&gt;&lt;P&gt;5e 21 6a a4 02 a1 18 7c 3c f2 db 71 22 dd b0 d5&lt;/P&gt;&lt;P&gt;2a ce 11 d7 08 9c a4 00 04 00&lt;/P&gt;&lt;P&gt;ASN1_Parse() returns status = -6101&lt;/P&gt;&lt;P&gt;ASN1_Parse() @ line # 4651&lt;/P&gt;&lt;P&gt;handleClientHandshakeMessages() returns status = -6101&lt;/P&gt;&lt;P&gt;SSL_SOCK_receive() returns status = -6101&lt;/P&gt;&lt;P&gt;SSL:doProtocol() returns status = -6101&lt;/P&gt;&lt;P&gt;SSL_negotiateConnection() returns status = -6101&lt;/P&gt;&lt;P&gt;SSL negotiation is failed!&lt;/P&gt;&lt;P&gt;LOG_OUTPUT: SSL INFO SSL stack shutting down.&lt;/P&gt;&lt;P&gt;Connection failed&lt;/P&gt;&lt;P&gt;Connection closed&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Jan 2013 09:08:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/NanoSSL-memory-allocation-problem/m-p/221072#M1017</guid>
      <dc:creator>ARQuattr</dc:creator>
      <dc:date>2013-01-06T09:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: NanoSSL memory allocation problem</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/NanoSSL-memory-allocation-problem/m-p/221073#M1018</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a critical question that deserves an answer!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 01:57:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/NanoSSL-memory-allocation-problem/m-p/221073#M1018</guid>
      <dc:creator>aeroscalar</dc:creator>
      <dc:date>2013-01-25T01:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: NanoSSL memory allocation problem</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/NanoSSL-memory-allocation-problem/m-p/221074#M1019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just a note - f&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;or critical issues and error please post a service request on our website &lt;A href="http://www.freescale.com/"&gt;www.freescale.com&lt;/A&gt; using the menu Support &amp;gt; Technical service request. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I was informed that this issue has already been submitted and our engineers are already solving the issue. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best regards&lt;/P&gt;&lt;P&gt;Petr Hradsky&lt;/P&gt;&lt;P&gt;Processor Expert Support Team&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 10:16:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/NanoSSL-memory-allocation-problem/m-p/221074#M1019</guid>
      <dc:creator>Petr_H</dc:creator>
      <dc:date>2013-01-25T10:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: NanoSSL memory allocation problem</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/NanoSSL-memory-allocation-problem/m-p/221075#M1020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Petr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this issue has been solved I think it would be helpful to post details in this thread. This would help other NanoSSL users and avoid repeating similar queries via a service request which I have had to do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI, my issue is simple. I am getting a memory allocation failure when I execute SSL_negotiateConnection(). This is presumably because NanoSSL is using the default MQX heap in on-chip RAM and there is not enough free memory. I have plenty of external RAM and I want to switch NanoSSL to use this memory. I have seen this capability mentioned but I have not located a mechanism to do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any pointers to this information would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Apr 2013 18:23:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/NanoSSL-memory-allocation-problem/m-p/221075#M1020</guid>
      <dc:creator>MPotts</dc:creator>
      <dc:date>2013-04-16T18:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: NanoSSL memory allocation problem</title>
      <link>https://community.nxp.com/t5/Processor-Expert-Software/NanoSSL-memory-allocation-problem/m-p/221076#M1021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark, in working with Freescale we concluded as you did that there is simply insufficient internal RAM to support this module. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I'm now in a similar situation as you are trying to get SSL to work off external RAM.&amp;nbsp; Please let me know if you make any progress with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Angelo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Apr 2013 14:09:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Processor-Expert-Software/NanoSSL-memory-allocation-problem/m-p/221076#M1021</guid>
      <dc:creator>ARQuattr</dc:creator>
      <dc:date>2013-04-17T14:09:44Z</dc:date>
    </item>
  </channel>
</rss>

