Hi,

 

I need your help about a ssl_accept issue. We have a https proxy server that
uses openssl library. 

After a period about time which is approx. 1 month,  SSL_accept returns 0
and SSL_get_error() returns 5(I think this matches SSL_ERROR_SYSCALL) .

 

SSL_get_error:  5 

SSL_accept_ret:  0

 

I also wonder whether there is something wrong about SSL_shutdown?

 

Here is my usage:

 

// create ssl connection

if (sslMode)

  {

    /* Set secure connection */

    int ret;

    sbio=BIO_new_socket(cli_fd,BIO_NOCLOSE);

    if(!sbio){

        logError("T<%s> bio_new_socket failed!",cli_id);

        return false;

    }

    ssl=SSL_new(globalCTX);

 

    if( !ssl ){

        logError("T<%s> ssl_new failed!",cli_id);

        return false;

    }

    SSL_set_bio(ssl,sbio,sbio);

    ret=SSL_accept(ssl);

    if(ret<=0)

    {

        logError("T<%s> SSL accept error: %d return_code:
%d",cli_id,SSL_get_error(ssl,ret),ret);

        if(ret==0){

                exit (1);

        }else{

                return false;

        }

    }else{

        logError("T<%s> ssl_accept successful, return:%d",cli_id,ret);

    }

  }

 

//close ssl connection

 

if (sslMode)

  {

       int ret ;

      ret = SSL_shutdown(ssl);

      if(ret == 0){

ret=shutdown(cli_fd,1);

                ret=SSL_shutdown(ssl);

                if(ret!=1){

                                logError("T<%u> SSL_shutdown failed, err %d,
SSL_get_error %d",uri_i,ret, SSL_get_error(ssl, ret));

                }

      }

    SSL_free(ssl);

  }

 

Kind Regards,

 

 

Murat Baykız

 

ARGELA TECHNOLOGIES

argelaLogo

Istanbul | Ankara | Santa Clara | Dubai 

Office: +90 312 299 22 94 | Fax: +90 312 299 22 93 

Hacettepe Teknokent 2. ARGE Binası Kat. 1 No. 14 Beytepe  Ankara, Turkey

 <http://www.argela.com/> http://www.argela.com

---------------------------------------

This e-mail and any attachments transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you are not the intended recipient you are hereby notified
that any forwarding, copying or use of the information is prohibited.

Bu e-posta mesajı ve ekleri sadece gönderildiği kişi veya kuruma özeldir.
Doğru alıcıya ulaşmamış olması halinde, bu mesajın baska bir alıcıya
yönlendirilmesi,kopyalanması veya kullanılması yasaktır.

 

 

<<image001.gif>>

Reply via email to