I have an SSL-enabled POP server using OpenSSL 0.9.4. running on Windows NT
using non-blocking socket i/o.

One particular customer has their POP client (Eudora 5.1) setup to check
mail every minute. After about an hour or so, the customer receives a
connection failure and the server log shows the SSL initialisation failed
with the following error

        error:00000000:lib(0):func(0):reason(0) (0)

I include a code fragment below for the server accept function, which is
based on some OpenSSL sample code.

I dont know how to resolve this. Any suggestions? Is the error handling
correct?

AFAIK, Eudora uses it's own SSL implementation. Assuming this, are there
any known interoperability issues between OpenSSL and the Eudora
implementation?


SSL *ssl;
char buf[ BUFLEN ];
DWORD error;
int err;

ssl = SSL_newProc( ctx );
if ( ssl != NULL )
{
    // setup certs etc
    ....

    // using non-blocking i/o
    ....
    SSL_set_fd( ssl, fdServer );    // fdServer is server socket param

SSL_set_accept_state( ssl );
        
    do
    {
        err = SSL_accept( ssl );
        error = SSL_get_error( ssl, err );
    } while ( error == SSL_ERROR_WANT_READ || error == SSL_ERROR_WANT_WRITE );

    if ( err <= 0 )
    {
        error = ERR_get_error();

ERR_error_string( error, buf );

        // log failure using buf and error gives
        // error:00000000:lib(0):func(0):reason(0) (0)
        // when the client fails

        // tidy up
        ....
    }
    else
    {
        //  other checks
        ....
    }

    // tidy up
    ....
}


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

Reply via email to