Say an application uses SSL_write() to write out (on a non-blocking socket)
a large buffer, which contains more bytes than an underlying SSL record can 
carry.
What is the behavior if, for example, one SSL record is successfully written,
but EWOULDBLOCK is returned when OpenSSL tries to write the next SSL record?
What value would be returned by SSL_write()?  Would it be
A: the number of bytes which were transmitted, or
B: -1 to indicate a failure?

The SSL_write() man page says that if the operation must be repeated 
(presumably
because of EWOULDBLOCK or EINTR), that the same arguments must be supplied 
to the
next call.  Say case 'A' above is true, and the application increases the 
'buf'
argument and reduces the 'num' argument, would that be incorrect?
Or, if case 'B' is true, does that imply that the OpenSSL library tracks 
how many
bytes have been written and keeps an offset pointer into 'buf' so that it 
knows
where to start the next write?


Tom Biggs


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to