Re: About non-blocking IO

2007-03-18 Thread Robin Redeker
On Mon, Mar 19, 2007 at 01:55:24AM +, Darryl Miles wrote: > Personally I can't see how SSL_read() was much of an issue, if it > returns data into the application suppled buffer it returns a value >0 > or if no data was returned it returns <=0. And if it returns <0 you have to check for SSL_E

Re: About non-blocking IO

2007-03-18 Thread Darryl Miles
Robin Redeker wrote: On Sat, Mar 17, 2007 at 09:36:45PM -0700, David Schwartz wrote: I would be even more trustfull if someone of the openssl developers would say a word about this. Something like: 'Yes yes, the man pages are a bit obsolete, you can pass different buffers to SSL_read for retries.

Re: About non-blocking IO

2007-03-18 Thread Robin Redeker
On Sat, Mar 17, 2007 at 09:36:45PM -0700, David Schwartz wrote: > > Could you please tell me where in the manual pages or in which > > document that is documented? That would be really helpful. > > Didn't this all start because you didn't trust the documentation? I do trust the documentation. Oth

RE: About non-blocking IO

2007-03-17 Thread David Schwartz
> Could you please tell me where in the manual pages or in which > document that is documented? That would be really helpful. Didn't this all start because you didn't trust the documentation? > Until now the man page for SSL_read reads: > > WARNING >When an SSL_read() operation h

Re: About non-blocking IO

2007-03-17 Thread Robin Redeker
On Sat, Mar 17, 2007 at 10:21:48AM -0700, David Schwartz wrote: > > > Thos are for SSL_write as far as I understand the manpage ode > > SSL_CTX_set_mode. What about SSL_read? My question was about SSL_read. > > > > Robin > > Those two flags resolve all the issues. Could you please tell me where

RE: About non-blocking IO

2007-03-17 Thread David Schwartz
> Thos are for SSL_write as far as I understand the manpage ode > SSL_CTX_set_mode. What about SSL_read? My question was about SSL_read. > > Robin Those two flags resolve all the issues. DS __ OpenSSL Project

Re: About non-blocking IO

2007-03-17 Thread Robin Redeker
On Fri, Mar 16, 2007 at 01:51:15PM -0700, David Schwartz wrote: > > > When an SSL_read() operation has to be repeated because of > > SSL_ERROR_WANT_READ > > or SSL_ERROR_WANT_WRITE, it must be repeated with the same arguments. > > > > I'm having a hard time to understand the openssl code t

Re: About non-blocking IO

2007-03-17 Thread Darryl Miles
David Schwartz wrote: This is all irritating legacy cruft. Any sane non-blocking OpenSSL user should set SSL_MODE_ENABLE_PARTIAL_WRITE and SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER. If I could reassert the status of these flags as potentially meaningless anyway in the current source code. My orig

RE: About non-blocking IO

2007-03-16 Thread David Schwartz
> When an SSL_read() operation has to be repeated because of > SSL_ERROR_WANT_READ > or SSL_ERROR_WANT_WRITE, it must be repeated with the same arguments. > > I'm having a hard time to understand the openssl code to confirm that > SSL_read doesn't need the same buffer on retries. > > And o

About non-blocking IO

2007-03-16 Thread Robin Redeker
Hello! I've spend some time on fixing the Perl openssl binding Net::SSLeay for non-blocking IO usage. I was working on the requirement of passing the same arguments to SSL_read and SSL_write on retries. Then someone told me that he read the openssl code (i guess it was the latest version), and do