SSL_connect() question

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SSL_connect() question

Adam Kornafeld
Hi,

I have the following code:
INCSSL::SSL *ssl;
INCSSL::SSL_CTX *ctx;
int rc;

ctx = SSL_CTX_new(SSLv23_client_method());
ssl = SSL_new(ctx);
SSL_set_fd(ssl, insocket);
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?

Thanks

-- Adam


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: SSL_connect() question

Paul Slootweg
At 13:54 13/06/2005, you wrote:

>Hi,
>
>I have the following code:
>INCSSL::SSL *ssl;
>INCSSL::SSL_CTX *ctx;
>int rc;
>
>ctx = SSL_CTX_new(SSLv23_client_method());
>ssl = SSL_new(ctx);
>SSL_set_fd(ssl, insocket);
>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()?

heck out the examples here http://www.rtfm.com/openssl-examples/

And also read the articles linked on that page.

Paul


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]