[cl-plus-ssl-devel] trouble wrapping iolib (gray) streams in a web server
David Lichteblau
david at lichteblau.com
Tue May 3 09:49:13 UTC 2011
Hi,
Quoting Attila Lendvai (attila.lendvai at gmail.com):
> dear list,
>
> i'm trying to use cl+ssl with iolib in our web server.
>
> the trivial-sockets based http server in examples.lisp works fine, but
> i get the error pasted below when using iolib streams.
>
> the stack frame number 2 looks suspicious to me: shouldn't the
> lisp-read callback call cl:read-byte on the _underlying_ iolib stream
> (as opposed to the wrapping ssl-server-stream)?
this sounds to like you're going throw the Lisp BIO, because cl+ssl
cannot identify the FD of the iolib stream and bypass iolib.
Unfortunately, the Lisp BIO is quite buggy (not to mention slow).
In the short term, the workaround you mentioned (using the FD directly)
is probably the best way forward.
The real solution is to layer SSL not on top of iolib streams, but
between iolib stream and iolib I/O muxing. That way we would also be
able to integrate SSL with the event loop.
I'm planning on rewriting cl+ssl as an iolib-aware solution as outlined
above, but cannot yet say when I'll be done with that.
d.
More information about the cl-plus-ssl-devel
mailing list