Re: Understanding SSL_read()/SSL_write()

2009-12-13 Thread Patrick Patterson
Sebastián Treu wrote: > Hi David, > > >>> Others things are to instantaneously put that client in a wait list >>> when SSL_write() could not succed, continue with the others, and try >>> with that client again later. But, sometimes we can get a WANT_WRITE >>> or WANT_READ when renegotiating so th

RE: Understanding SSL_read()/SSL_write()

2009-12-12 Thread David Schwartz
Sebastian Treu: > > If you set ALLOW_MOVING_WRITE_BUFFER, the restriction is relaxed. The > > only > > restriction that remains is that you must present a consistent data > > stream. > > For example, if you try to SSL_write "foo" and two bytes are sent, > > your next > > SSL_write *must* start wit

Re: Understanding SSL_read()/SSL_write()

2009-12-12 Thread Sebastián Treu
On Sat, Dec 12, 2009 at 4:12 PM, David Schwartz wrote: > Sebastian Treu wrote: > >> Well, maybe I miss the point of what man pages wanted to say with: >> >> "[...] >> WARNING >>        When an SSL_write() operation has to be repeated because of >>        SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE

RE: Understanding SSL_read()/SSL_write()

2009-12-12 Thread David Schwartz
Sebastian Treu wrote: > Well, maybe I miss the point of what man pages wanted to say with: > > "[...] > WARNING >When an SSL_write() operation has to be repeated because of >SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE, it must be repeated > with >the same arguments. > [...

Re: Understanding SSL_read()/SSL_write()

2009-12-12 Thread Sebastián Treu
On Sat, Dec 12, 2009 at 7:19 AM, Sebastián Treu wrote: > differents arguments. I also noted that SSL_write() is "clever" enough > to send _any_ length, so segmented writes will be overriding that > warning (if I undestood what man wanted to say). When I say clever > enough, I meant that in what I

Re: Understanding SSL_read()/SSL_write()

2009-12-12 Thread Sebastián Treu
Hi David, >> Others things are to instantaneously put that client in a wait list >> when SSL_write() could not succed, continue with the others, and try >> with that client again later. But, sometimes we can get a WANT_WRITE >> or WANT_READ when renegotiating so this does not appears a solution.

RE: Understanding SSL_read()/SSL_write()

2009-12-11 Thread David Schwartz
Sebastian Treu: > As David said in an older thread, I can think of the API as a state > machine and then, regarding how much progress we get, do something. > Considering this, I have some doubts about a communication between > server and clients. Let's say we write a client that in his nature, >

Re: Understanding SSL_read()/SSL_write()

2009-12-11 Thread Sebastián Treu
Hi, I didn't want to start another thread about this two I/O functions. For starters (like me) on this two I/O calls, things get a bit confusing at the beggining. I used to read man pages and doc before asking something that I don't know and gather information about it to try to resolve the proble

Re: Understanding SSL_read()/SSL_write()

2009-10-14 Thread aerowolf
On Wed, Oct 14, 2009 at 9:55 AM, Rij wrote: Hello everyone, I need a deeper understanding of SSL_read()/SSL_write() and was wondering if someone could please provide some insight. As far as I understand, OpenSSL has is a record-oriented protocol. Lets say the record size is 16K. Let's say a

RE: Understanding SSL_read()/SSL_write()

2009-10-14 Thread David Schwartz
> Hello everyone, > > I need a deeper understanding of SSL_read()/SSL_write() and was > wondering if someone could please provide some insight. > > As far as I understand, OpenSSL has is a record-oriented protocol. > Lets say the record size is 16K. Let's say a client requests data of > size 40K

Understanding SSL_read()/SSL_write()

2009-10-14 Thread Rij
Hello everyone, I need a deeper understanding of SSL_read()/SSL_write() and was wondering if someone could please provide some insight. As far as I understand, OpenSSL has is a record-oriented protocol. Lets say the record size is 16K. Let's say a client requests data of size 40K and then waits o