AnsweredAssumed Answered

NanoSSL memory allocation problem

Question asked by Angelo Quattrociocchi on Jan 6, 2013
Latest reply on Apr 17, 2013 by Angelo Quattrociocchi

Hi,

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.  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.  Based on the reported line number I believe the problem is occurring at the MALLOC in TREE_MakeNewTreeItem() in the tree.c file.

 

Any ideas what is causing this error?

 

Thanks

 

Connecting to   [209.132.180.195: 443]

MOCANA_initLog()

LOG_OUTPUT: MSS WARNING NOT A PRODUCTION BUILD: MOCANA DEBUG CONSOLE HAS BEEN ENABLED.

SSL_init()

SSL_init: completed after = ( (0.70)) milliseconds.

mss_ssl_ca_mgmt_init_upcalls()

mss_rtcs_connect_socket()

SSL_connect()

LOG_OUTPUT: SSL INFO SSL client made connection.

SSL_negotiateConnection()

Handshake length = 57

(CLIENT) Client Hello

01 00 00 35 03 01 94 56 51 06 31 28 5a 82 0b 68

5d 4b ca 80 1d f2 a5 9d 50 e7 c7 32 14 0a cd a9

20 f9 35 49 ff c4 00 00 0e 00 2f 00 3c 00 35 00

3d 00 04 00 05 00 0a 01 00

Handshake length = 74

(CLIENT) Server hello

02 00 00 46 03 01 00 03 d4 2e 47 e1 63 fd 36 27

4e c3 20 1a ff e2 26 54 9d 89 30 8f be 76 45 96

dc fa a2 e1 a3 19 20 63 c9 2b c5 6f a5 9d 6f 86

5e 21 6a a4 02 a1 18 7c 3c f2 db 71 22 dd b0 d5

2a ce 11 d7 08 9c a4 00 04 00

ASN1_Parse() returns status = -6101

ASN1_Parse() @ line # 4651

handleClientHandshakeMessages() returns status = -6101

SSL_SOCK_receive() returns status = -6101

SSL:doProtocol() returns status = -6101

SSL_negotiateConnection() returns status = -6101

SSL negotiation is failed!

LOG_OUTPUT: SSL INFO SSL stack shutting down.

Connection failed

Connection closed

 


Outcomes