-->
Page 1 of 1

Always got libssl.a error when compile

PostPosted: Wed Apr 15, 2015 11:08 am
by ocb00999
My previous post was deleted, don't know why, so post again.

I compile the firmware on cygwin on win7. I use the Xtensa tool chain.
Everything goes smooth until the last step, the cmd windows shows:

..................../sdk/esp_iot_sdk_v1.0.0/lib\libssl.a<ssl_loader.o>: In function 'ssl_obj_free':
<.irom0.text+0x4c0>: undefined reference to 'default_private_key'

Anyone know what's going on? Any help will be appreciated.
Thank you very much.

Re: Always got libssl.a error when compile

PostPosted: Wed Apr 15, 2015 3:19 pm
by sfranzyshen
ocb00999 wrote:My previous post was deleted, don't know why, so post again.

I compile the firmware on cygwin on win7. I use the Xtensa tool chain.
Everything goes smooth until the last step, the cmd windows shows:

..................../sdk/esp_iot_sdk_v1.0.0/lib\libssl.a<ssl_loader.o>: In function 'ssl_obj_free':
<.irom0.text+0x4c0>: undefined reference to 'default_private_key'

Anyone know what's going on? Any help will be appreciated.
Thank you very much.


take a look at the esp_iot_sdk_v1.0.0/examples/IoT_Demo/include/ssl/ folder ...

unsigned char default_private_key[] =
unsigned char default_certificate[] =

and in the user_main.c file ...
#ifdef SERVER_SSL_ENABLE
#include "ssl/cert.h"
#include "ssl/private_key.h"
#else
#ifdef CLIENT_SSL_ENABLE
unsigned char *default_certificate;
unsigned int default_certificate_len = 0;
unsigned char *default_private_key;
unsigned int default_private_key_len = 0;
#endif
#endif

Re: Always got libssl.a error when compile

PostPosted: Wed Apr 15, 2015 9:10 pm
by ocb00999
Thank you very much. That works.
But after I burn in the firmware, when I try to establish connection with an SSL server, api.parse.com,
I see the following debug information:
Client handshake start.
Client handshake failed
Could it be because of the default cert length or default private key length too short? Not enough to contain the new downloaded cert?

sfranzyshen wrote:
ocb00999 wrote:My previous post was deleted, don't know why, so post again.

I compile the firmware on cygwin on win7. I use the Xtensa tool chain.
Everything goes smooth until the last step, the cmd windows shows:

..................../sdk/esp_iot_sdk_v1.0.0/lib\libssl.a<ssl_loader.o>: In function 'ssl_obj_free':
<.irom0.text+0x4c0>: undefined reference to 'default_private_key'

Anyone know what's going on? Any help will be appreciated.
Thank you very much.


take a look at the esp_iot_sdk_v1.0.0/examples/IoT_Demo/include/ssl/ folder ...

unsigned char default_private_key[] =
unsigned char default_certificate[] =

and in the user_main.c file ...
#ifdef SERVER_SSL_ENABLE
#include "ssl/cert.h"
#include "ssl/private_key.h"
#else
#ifdef CLIENT_SSL_ENABLE
unsigned char *default_certificate;
unsigned int default_certificate_len = 0;
unsigned char *default_private_key;
unsigned int default_private_key_len = 0;
#endif
#endif