Hi

I'm trying to track down an issue with ssl in python, which used OpenSSL 
1.1. To try to reduce the number of moving parts, I've managed to narrow 
it down to a smaller test.

The setup is .. the C code below (which runs fine on linux) has been 
compiled on RISC OS (native) with GCC10 (buult from the auto builder). 
LibSSL (1.1.0) is the one I built with the auto-builder, but I had to 
tweak it to use the 1.1.0n (rather than m) sources and I built it for 
armv6z (IIRC) instaad of armv3.


#include <openssl/ssl.h>

int main(void)
{
    SSL_CTX *ctx = SSL_CTX_new( TLS_client_method() );
    printf("ctx: %x\n", ctx);
    printf("load_verify_locations: %d\n",
           SSL_CTX_load_verify_locations(ctx, "cacert.pem", NULL) );
    SSL_CTX_free(ctx);
    printf("Bye!\n");
}


*gcc -c ssltest.c -ILibSSL11:
*gcc ssltest.o -o ssltest -LLibSSLl11: -lssl -lcrypto -ldl
*ssltest
ctx: 71a88

Fatal signal received: Segmentation fault

Stack backtrace:

Running thread 0x58834 (Main Thread)
  (50df5f40) lr: 48fa9dbc :    7ADBC : 
SharedLibs:lib.armeabihf.libunixlib/so/5/0/0
  (50df5fb0) lr: 48fab450 :    7C450 : 
SharedLibs:lib.armeabihf.libunixlib/so/5/0/0
  (50df5fb4) lr: 50ef6d3c
  (48fab450) lr: ef020014
Stack frame has gone out of bounds with address ebfff8ec

*

If I rename the pem file, it reports SSL_CTX_load_verify_locations: 0 
(which one would expect) then has a similar error (wihtout pritning Bye!)


Anyone any ideas?

Cheers

Chris
-- 
Chris Johns

This email is measured by weight not volume - contents may settle during 
transit.

_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

Reply via email to