I read the README file and ran setting LDFLAGS to what is recommended there as follows:
./configure --disable-shared CC=/opt/devkitpro/devkitPPC/bin/powerpc-eabi-gcc --host=ppc --without-zlib --enable-singleThreaded RANLIB=/opt/devkitpro/devkitPPC/bin/powerpc-eabi-ranlib CFLAGS="-DDEVKITPRO -DGEKKO" CPPFLAGS="-DNO_WRITEV -DOPENSSL_EXTRA" LDFLAGS="-g -mrvl -mcpu=750 -meabi -mhard-float -Wl,-Map,$(notdir $@).map"
LDFLAGS="-g -mrvl -mcpu=750 -meabi -mhard-float -Wl,-Map,$(notdir $@).map"
The build fails when trying to compile the client example (which is expected but somehow messy to fix and I wanted to know if there was a more straightforward way of doing this).
As I stated the program (when compiling the source files with the whole project) crashes (it compiles without warnings) when I call ssl = CyaSSL_new(ctx), which I think is something that happens somewhere in InitSSL() (possibly because of an incorrect use of the CyaSSL_CTX_load_verify_buffer();? I'm not sure if the string I'm passing is appropriated nor if the arguments I'm using are the correct ones )
I'm basically doing this:
const char cert= "-----BEGIN CERTIFICATE-----\r\nMIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJ\r\nBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh[...]\r\n-----END CERTIFICATE-----";
tmp->ctx = CyaSSL_CTX_new(CyaSSLv23_client_method()); //ctx is a member of a c++ class, this code is at the function that initializes the class
CyaSSL_CTX_load_verify_buffer(tmp->ctx, (const unsigned char *)cert, strlen(cert), SSL_FILETYPE_PEM);
//on the member function which does the actual request
ssl = CyaSSL_new(this->ctx); //crashes at this point
//I defined these:
#define SIZEOF_LONG_LONG 8
Any clues? I'm hoping this is an obvious answer and somebody here can save me plenty of time
PS: I'm trying to do HTTPS requests, that's all I need.