On Tue, Dec 4, 2012 at 10:24 PM, Gustaf Neumann <neum...@wu.ac.at> wrote:
>
> Today, i was hunting another problem in connection with nsssl, which
> turns out to be a weakness of our interfaces. The source for the problem
> is that the buffer management of OpenSSL is not aligned with the buffer
> management in naviserver. In the naviserver driver, all receive requests
> are triggered via the poll, when sockets are readable. With OpenSSL it
> might be as well possible that data as a leftover from an earlier
> receive when a smaller buffer is provided. Naviserver requested during
> upload spool reveive operations with a 4KB buffer. OpenSSL might receive
> "at once" 16KB. The read operation with the small buffer will not drain
> the OpenSSL buffer, and later, poll() will not be triggered by the fact,
> that the socket is readable (since the buffer is still quite full). The
> problem happened in NaviServer, when the input was spooled (e.g. file
> uploads). I have doubts that this combination ever worked. I have
> corrected the problem by increasing the buffer variable in the driver.c.
> The cleaner implementation would be to add an "Ns_DriverReadableProc
> Readable"  similar to the "Ns_DriverKeepProc Keep", but that would
> effect the interface of all drivers.

Another way to use the openssl library is to manage socket read/writes
yourself and hand memory buffers to openssl to encrypt/decrypt.

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to