>I have the following code:
>ctx = SSL_CTX_new(SSLv23_client_method());
>ssl = SSL_new(ctx);
>rc = SSL_connect(ssl);
>and rc returns -1, meaning that the SSL handshake was not successful. Can
>anyone tell what the reason of the failiure could be?
Did you connect() the socket before calling SSL_connect()?