Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By ocb00999
#14616 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.
User avatar
By sfranzyshen
#14645
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
User avatar
By ocb00999
#14670 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