Hello,
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 16384 (LWP 8321)]
> 0x4003f866 in SSL_CTX_load_verify_locations () from /usr/lib/libssl.so.0
>
>
>
> Here is the code :
>
>
> #define CIPHER_LIST "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH"
> #define CAFILE "/home/kenzo/prova/provola/rsa/CA/cacert.pem"
> #define CADIR "/home/kenzo/prova/provola/rsa/CA/certs"
> #define CERTFILE "/home/kenzo/prova/provola/rsa/CA/newcert.pem"
>
> SSL_CTX *setup_client_ctx (void)
> {
> SSL_CTX *ctx;
>
> //SSL_CTX *ctx = SSL_CTX_new( NULL);
>
> ctx = SSL_CTX_new(SSLv23_method( ));

Check if ctx is NULL here.
If is NULL add code:
SSL_load_error_strings();
ERR_print_errors_fp(stderr);
to check real error.
Maybe you should add:
SSLeay_add_ssl_algorithms();
to load crypto algorithms.

> if (SSL_CTX_load_verify_locations(ctx, CAFILE, 0) != 1)
> error("Error loading CA file and/or directory");

Use NULL instead of 0 (defined as ((void*)0) - sometimes,
when no function declaration is available, this tells to
compiler what context should be used: null pointer
(machine zero should be used by compiler) or memory address zero.

Best regards,
--
Marek Marcola

__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majordomo@openssl.org