Re: SSL_read() returning SSL_ERROR_SYSCALL with errno 11 EAGAIN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 03, 2019 at 09:34:14AM +0000, John Unsworth wrote:

> Testing changed code.

For the record, though I think you realise this, *both* the SSL_read()
or SSL_write() and the following SSL_get_error() need to be protected
as a unit by the *same* instance of the locked mutex.  It would not
be enough to lock these separately.

    acquire_lock();
	if (reading)
	    ret = SSL_read(ssl, ...); 
	else
            ret = SSL_write(ssl, ...);
	if (ret <= 0)
	    err = SSL_get_error(ssl, ret);
    release_lock();

    /* Handle EOF and errors */

-- 
	Viktor.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux