Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[FWD] SSL_write returned SSL_ERROR_SSL

358 views
Skip to first unread message

Lutz Jaenicke

unread,
Nov 3, 2009, 2:12:35 PM11/3/09
to
Forwarding to openssl-users for public discussion.

Best regards,
Lutz

----- Forwarded message from sandeep...@wipro.com -----

Subject: SSL_write returned SSL_ERROR_SSL
Date: Tue, 3 Nov 2009 19:25:03 +0530
Thread-Topic: SSL_write returned SSL_ERROR_SSL
Thread-Index: AcpcjT4Rk9sPCTZ0QEaWqLVTn71DBQ==
From: sandeep...@wipro.com
To: r...@openssl.org

I am facing some weird problem in SSL_write(). Most of the times it returned with "SSL_ERROR_SSL".
Can anyone explain what is this error and how can we fix this.
I am using 0.9.8g openssl version.

Any assistance (including temporary workarounds) appreciated.

Thanks....

Please do not print this email unless it is absolutely necessary.

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

----- End forwarded message -----
--
Lutz Jaenicke jaen...@openssl.org
OpenSSL Project http://www.openssl.org/~jaenicke/
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openss...@openssl.org
Automated List Manager majo...@openssl.org

lu...@xharbour.com.br

unread,
Nov 3, 2009, 2:31:44 PM11/3/09
to
Hi

I use to write data to openssl the follow function

int hb_inetSSLWrite(int com,SSL* pSSL, int timeout, char * msg, int
length, int* iRet)
{

int ret;
int sslerr;
int r;
fd_set fd_r, fd_w;
struct timeval tv;

do
{
ret = SSL_write(pSSL, msg, length);
sslerr = SSL_get_error(pSSL, ret);

if ( ret > 0)
{
r = 1;
*iRet = 0;
break;
}
*iRet = sslerr;
FD_ZERO( &fd_r );
FD_ZERO( &fd_w );
if( timeout > 0 )
{
tv.tv_sec = timeout / 1000;
tv.tv_usec = ( timeout % 1000 ) * 1000;
}

switch (sslerr)
{
case SSL_ERROR_WANT_READ:
FD_SET(com,&fd_r);
break;
case SSL_ERROR_WANT_WRITE:
FD_SET(com,&fd_w);
break;
default:
return -1;
}
if( timeout > 0 )
r = select(com+1,&fd_r,&fd_w,NULL,&tv);
else
r = select(com+1,&fd_r,&fd_w,NULL,NULL);

} while ( ret == -1 && r != 0 );

if ( r == 0)
return -1;

return ret;
}

Regards
Luiz

Dave Thompson

unread,
Nov 3, 2009, 8:12:10 PM11/3/09
to
> From: owner-ope...@openssl.org On Behalf Of Lutz Jaenicke
> Sent: Tuesday, 03 November, 2009 14:13

> ----- Forwarded message from sandeep...@wipro.com -----
> Subject: SSL_write returned SSL_ERROR_SSL
> Date: Tue, 3 Nov 2009 19:25:03 +0530
> Thread-Topic: SSL_write returned SSL_ERROR_SSL
> Thread-Index: AcpcjT4Rk9sPCTZ0QEaWqLVTn71DBQ==
> From: sandeep...@wipro.com
> To: r...@openssl.org
>
> I am facing some weird problem in SSL_write(). Most of the
> times it returned with "SSL_ERROR_SSL".
> Can anyone explain what is this error and how can we fix this.
> I am using 0.9.8g openssl version.
>
After (any) SSL_* returns SSL_ERROR_SSL, to get more detailed
information about the error(s) either:
- call ERR_get_error (note different name) to get an unsigned long,
then ERR_error_string (and/or other ERR_*) routines to decode it,
and display, and repeat until ERR_get_error returns zero; or
- call ERR_print_errors_fp (stderr or other FILE*) which
does the above for you in a default format.
0 new messages