Arne Ansper <[EMAIL PROTECTED]>:

[...]
> i proposed to remove input parameter check from ssl/s2_pkt.c write_pending
> and ssl/s3_pkt.c ssl3_write_pending functions. there was a discussion
> about it back in January. 
[...]
>         if ((s->s3->wpend_tot > (int)len) || (s->s3->wpend_buf != buf)
>                 || (s->s3->wpend_type != type))
>                 {
>                 SSLerr(SSL_F_SSL3_WRITE_PENDING,SSL_R_BAD_WRITE_RETRY);
>                 return(-1);
>                 }

> [...]  when i get more data than there is room buffer i call
> something like BUF_MEM_grow, which does realloc. [...]  right now
> this check deserves only one purpose: it disallows me to reallocate
> buffers. if we remove this check, everything will still work and
> SSL_write will be more like write(2).

It will work with the current implementation (but only if the
applications don't do too stupid things, such as point to a buffer
with different contents); but this may change.  Think of future
protocol versions that may allow records so large that we don't want
to store everything in a buffer at once; and then the encryption or
hashing algorithms may use the particular alignment of the data as
found during the first call to SSL_write.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to