RE: SSL_renegotiate broken in non-blocking mode with PARTIAL_WRITE?

2009-05-23 Thread David Schwartz
Thor Lancelot Simon > On Sat, May 23, 2009 at 05:30:54AM -0700, David Schwartz wrote: > Let me start out by saying I think you're correct on most of your > points, and I was incorrect. But I do want to clarify one issue. > > Set SSL_ACCEPT_MOVING_WRITE_BUFFER. The only requirement then > > is

Re: SSL_renegotiate broken in non-blocking mode with PARTIAL_WRITE?

2009-05-23 Thread Thor Lancelot Simon
On Sat, May 23, 2009 at 05:30:54AM -0700, David Schwartz wrote: Let me start out by saying I think you're correct on most of your points, and I was incorrect. But I do want to clarify one issue. > Set SSL_ACCEPT_MOVING_WRITE_BUFFER. The only requirement then is that you > not try to "unwrite" da

RE: SSL_renegotiate broken in non-blocking mode with PARTIAL_WRITE?

2009-05-23 Thread David Schwartz
> On Fri, May 22, 2009 at 03:14:46PM -0700, David Schwartz wrote: > > Thor Lancelot Simon wrote: > > > 1) I have data to write, and the SSL session's descriptor > > > selects as ready-to-write. > > This already scares me. You have data to write on the > > unencrypted stream to > > the SS

Re: SSL_renegotiate broken in non-blocking mode with PARTIAL_WRITE?

2009-05-22 Thread Thor Lancelot Simon
On Fri, May 22, 2009 at 03:14:46PM -0700, David Schwartz wrote: > > Thor Lancelot Simon wrote: > > > 1) I have data to write, and the SSL session's descriptor > >selects as ready-to-write. > > This already scares me. You have data to write on the unencrypted stream to > the SSL conne

RE: SSL_renegotiate broken in non-blocking mode with PARTIAL_WRITE?

2009-05-22 Thread David Schwartz
Thor Lancelot Simon wrote: > 1) I have data to write, and the SSL session's descriptor > selects as ready-to-write. This already scares me. You have data to write on the unencrypted stream to the SSL connection. The SSL session's descriptor write is for the encrypted stream betwee

Re: SSL_renegotiate broken in non-blocking mode with PARTIAL_WRITE?

2009-05-22 Thread Darryl Miles
Replies below v Thor Lancelot Simon wrote: The pattern is like this: 1) I have data to write, and the SSL session's descriptor selects as ready-to-write. 2) I call SSL_renegotiate. I do understand that in a server application this merely sends the

SSL_renegotiate broken in non-blocking mode with PARTIAL_WRITE?

2009-05-21 Thread Thor Lancelot Simon
I have a server application which uses OpenSSL (0.9.9-current as of about four months ago) in nonblocking mode. As a test, I added an option to call SSL_renegotiate every 100 successful SSL_read or SSL_write calls. I am seeing very strange behavior and I wonder if SSL_renegotiate actually works i