Take a look in /usr/include/sys/errno.h, and find what the error
number 2 is. Or, type 'man errno' to read the manpage on the topic.
-Kyle H
On 6/29/06, Jorge Samayoa <[EMAIL PROTECTED]> wrote:
Hi Kyle:
The value of ret=-1 (SSL_ERROR_SYSCALL) and errno = 2... I change my
code as follow:
SSL_set_bio(ssl, sbio, sbio);
if ((ret = SSL_connect(ssl)) <= 0) {
printf("ret=%d, errno=%d\n", ret, errno);
switch(SSL_get_error(ssl, ret)) {
case SSL_ERROR_NONE:
printf("SSL_ERROR_NONE\n");
break;
case SSL_ERROR_ZERO_RETURN:
printf("SSL_ERROR_ZERO_RETURN\n");
break;
case SSL_ERROR_WANT_READ:
printf("SSL_ERROR_WANT_READ\n");
break;
case SSL_ERROR_WANT_WRITE:
printf("SSL_ERROR_WANT_WRITE\n");
break;
case SSL_ERROR_WANT_CONNECT:
printf("SSL_ERROR_WANT_CONNECT\n");
break;
case SSL_ERROR_WANT_ACCEPT:
printf("SSL_ERROR_WANT_ACCEPT\n");
break;
case SSL_ERROR_WANT_X509_LOOKUP:
printf("SSL_ERROR_WANT_X509_LOOKUP\n");
break;
case SSL_ERROR_SYSCALL:
printf("SSL_ERROR_SYSCALL\n");
break;
case SSL_ERROR_SSL:
printf("SSL_ERROR_SSL\n");
break;
}
berr_exit("SSL connect error");
}
Thank you for your help... Greetings
Jorge Mario Samayoa S.
Analista de Sistemas Back Office
Telefónica Móviles Guatemala
Cel: 5608-3434 (corto 5334)
Fijo: 2277-4651 (corto 4651)
-----Mensaje original-----
De: Kyle Hamilton [mailto:[EMAIL PROTECTED]
Enviado el: Jueves, 29 de Junio de 2006 01:20 PM
Para: [email protected]
CC: Jorge Samayoa
Asunto: Re: [openssl.org #1350] Tru64 V5.1 SSL connect error
If you can, get the value of errno to determine what the syscall error is.
-Kyle H
On 6/29/06, via RT <[EMAIL PROTECTED]> wrote:
>
> I tried to run an Application in a Server with Tru64 Ver 5.1 and using
> OpenSSL Version 0.9.8a but returns "SSL connect error"... the code that
> I have is the following:
>
> void InitSSL()
> {
> /* Build our SSL context */
> ctx = initialize_ctx(KEYFILE, PASSWORD);
>
> /* Connect the TCP socket */
> socket = tcp_connect(HOST, PORT);
>
> /* Connect the SSL socket */
> ssl = SSL_new(ctx);
> sbio = BIO_new_socket(socket, BIO_NOCLOSE);
> SSL_set_bio(ssl, sbio, sbio);
>
> if (SSL_connect(ssl) <= 0)
> berr_exit("SSL connect error");
>
> if (require_server_auth)
> check_cert(ssl, HOST);
> }
>
> The function SSL_connect() returns -1 (SSL_ERROR_SYSCALL)... really I
> don't know what it's the problem??... I put the same Application in
> other 2 Servers with Tru64 Ver 5.1b and works perfect!!!... the only
> difference is the Version of the Operating System...
>
> Do You can help me?.. Thanks a lot!!... ;o) Greetings
> ______________________________________________________________________
> OpenSSL Project http://www.openssl.org
> Development Mailing List [email protected]
> Automated List Manager [EMAIL PROTECTED]
>
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [EMAIL PROTECTED]