Tables for handling various non-blocking I/O errors

2012-08-22 Thread James Marshall
For my own benefit and that of others, I made a page at http://jmarshall.com/stuff/handling-nbio-errors-in-openssl.html listing various error conditions after SSL_accept(), SSL_connect(), SSL_read(), SSL_write(), and SSL_shutdown(), all on *non-blocking* sockets. The tables show what to do after t

RE: Meanings of various return codes with non-blocking I/O?

2012-08-09 Thread Dave Thompson
>From: owner-openssl-us...@openssl.org On Behalf Of James Marshall >Sent: Thursday, 09 August, 2012 19:41 >I'm trying to write a secure embedded HTTP server using OpenSSL. >I'm using non-blocking I/O, and the main functions I'm using are >SSL_accept(), SSL_read(),

Meanings of various return codes with non-blocking I/O?

2012-08-09 Thread James Marshall
I'm trying to write a secure embedded HTTP server using OpenSSL. I'm using non-blocking I/O, and the main functions I'm using are SSL_accept(), SSL_read(), SSL_write(), and SSL_shutdown(). After each one, I want to handle all possible return codes, but I can't find do

A few questions about non-blocking I/O in a secure HTTP server

2012-07-06 Thread James Marshall
I'm trying to write a secure HTTP server with pipelining, using OpenSSL. It uses non-blocking I/O, and I have a few questions. The behavior I'm seeing is: I start the server on localhost, then I open a browser and try to access the server. The browser hangs with "Waiting for loc

Re: Using OpenSSL with non-blocking I/O

2011-05-06 Thread Gayathri Sundar
I think the openssl src already has sample server and client programs which are written in non blocking mode ..check wserver2.c if I am able to recall. On Fri, May 6, 2011 at 2:42 PM, Graham Leggett wrote: > On 06 May 2011, at 9:23 PM, derleader mail wrote: > > Can you show us the source code.

Re: Using OpenSSL with non-blocking I/O

2011-05-06 Thread Graham Leggett
On 06 May 2011, at 9:23 PM, derleader mail wrote: Can you show us the source code. Paste it into pastebin.org. We do non blocking SSL by accepting the socket in the normal way (using accept, not SSL_accept), and then wrapping the socket in a BIO like this: BIO *sbio = BIO_new_so

Re: Re: Using OpenSSL with non-blocking I/O

2011-05-06 Thread derleader mail
>> Hi, >> >> >> >> I am developing and application using OpenSSL. I have a proprietary system >> to handle connection/read data from sockets. All I need to do is to pass >> callback functions to the system to >> >> 1. Handle new connection >> >> 2. Read

Re: Using OpenSSL with non-blocking I/O

2011-05-06 Thread Dr. Stephen Henson
On Fri, May 06, 2011, Rajib Karmakar wrote: > Hi, > > > > I am developing and application using OpenSSL. I have a proprietary system > to handle connection/read data from sockets. All I need to do is to pass > callback functions to the system to > > 1. Handle new connection > >

Using OpenSSL with non-blocking I/O

2011-05-06 Thread Rajib Karmakar
Hi, I am developing and application using OpenSSL. I have a proprietary system to handle connection/read data from sockets. All I need to do is to pass callback functions to the system to 1. Handle new connection 2. Read data on the given port Now while I use Open

BIO_do_connect fails. Usage of socket, BIO socket and non-blocking I/O.

2008-05-29 Thread Konrad Kleine
n blocking mode (the default in our API and in OpenSSL, right?). But when we try to use non-blocking I/O we run into troubles and there are so many options to choose from and tweak that we simply need some help. Let's start with the client... =

Re: NON-BLOCKING I/O

2004-01-19 Thread Joseph Bruni
--Original Message- From: [EMAIL PROTECTED] Sent: Jan 19, 2004 10:14 AM To: [EMAIL PROTECTED] Subject: Re: NON-BLOCKING I/O Somebody please correct me if I'm wrong, but I believe in that case you'd receive a separate error, SSL_ERROR_ZERO_RETURN.  I have, for example, experienced

NON-BLOCKING I/O

2004-01-19 Thread Joseph Bruni
As a quick follow-up to my previous question. If I call SSL_read and receive a WANT result, does that also preclude me from calling SSL_write if the socket is currently writable? __ OpenSSL Project

Re: NON-BLOCKING I/O

2004-01-19 Thread KOverton
Somebody please correct me if I'm wrong, but I believe in that case you'd receive a separate error, SSL_ERROR_ZERO_RETURN.  I have, for example, experienced conditions where the end of data transmission occurred precisely on my reading buffer size.  So the next SSL_raed() that I attempt results in

NON-BLOCKING I/O

2004-01-19 Thread Joseph Bruni
I have yet another question regarding non-blocking I/O and the OpenSSL library. With normal sockets that have been set to non-blocking, an attempt to read when no data is present will return an EAGAIN. In my case, no data on a read is fine, since that just means there are no messages to pick up

how to build openssl to enable non-blocking I/O?

2003-10-08 Thread linux guy
any build option is provided to enable non-blocking I/O? thx -- __ http://www.linuxmail.org/ Now with e-mail forwarding for only US$5.95/yr Powered by Outblaze __ OpenSSL Project

Re: Non blocking I/O

2002-01-14 Thread Eric Rescorla
"Stuart Walsh" <[EMAIL PROTECTED]> writes: > Since switching my server to non blocking I/O, I've been having all > sorts of problems. I've read the docs over and over, but the stuff > about SSL_write() and SSL_ERROR_WANT_WRITE make little sense and are >

Non blocking I/O

2002-01-14 Thread Stuart Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Since switching my server to non blocking I/O, I've been having all sorts of problems. I've read the docs over and over, but the stuff about SSL_write() and SSL_ERROR_WANT_WRITE make little sense and are very complicated. Bas

RE: Non-blocking I/O help

1999-12-20 Thread Li, Yunhong
. Cheers. --Yunhong -Original Message- From: Nicolas Roumiantzeff [mailto:[EMAIL PROTECTED]] Sent: Monday, December 20, 1999 4:18 AM To: [EMAIL PROTECTED] Cc: "Sean O'Dell"@epsilon.engelschall.com Subject: Re: Non-blocking I/O help For me, it works only for SSL_read and

Re: Non-blocking I/O help

1999-12-20 Thread Bodo Moeller
On Mon, Dec 20, 1999 at 01:18:04PM +0100, Nicolas Roumiantzeff wrote: > As SSL_connect and SSL_accept make several calls to the underlying socket > API, the SSL_ERROR_WANT_READ failure can happen in the middle of the > processing, not just on the first read, so calling it later wont work > becau

Re: Non-blocking I/O help

1999-12-20 Thread Nicolas Roumiantzeff
PROTECTED]> À : List: <[EMAIL PROTECTED]> Cc : "Sean O'Dell"@epsilon.engelschall.com <"Sean O'Dell"@epsilon.engelschall.com> Date : samedi 18 décembre 1999 22:12 Objet : Re: Non-blocking I/O help >Sean O'Dell <[EMAIL PROTECTED]> in ulf.

Re: Non-blocking I/O help

1999-12-18 Thread Bodo Moeller
Sean O'Dell <[EMAIL PROTECTED]> in ulf.openssl.users: >[...] SSL_connect, SSL_accept, SSL_read and SSL_write. Apparently, when the > underlying socket is in non-blocking mode, these functions can/may/tend to > behave in a non-blocking way also. What I'd like to know is, how can I tell > when th

Non-blocking I/O help

1999-12-13 Thread Sean O'Dell
Hi, I'm using OpenSSL in non-blocking mode and I can't find documentation anywhere to clear up some questions I have. Basically, I'm only concerned with SSL_connect, SSL_accept, SSL_read and SSL_write. Apparently, when the underlying socket is in non-blocking mode, these functions can/may/tend