Lispworks and SSL
First of all, apologies for the inter-mailing list cross post.
I've recently tried to upgrade our version of portableaserve
from something totally ancient (1.2.12 ?) to the latest CVS
version.
When I did this, SSL support (i.e. HTTPS) stopped working.
I tried with both my old version of cl-ssl, and what
appears to be the currently available version.
Does anyone have SSL (server side) support working with
portableaserve under Lispworks? If so, what is your setup?
Furthermore, I note that there is now support for client side SSL
using LW's native ssl support, i.e. the method
#+(and :lispworks4.4 (not :cl-ssl))
(defmethod make-ssl-client-stream ((socket-stream bidirectional-binary-socket-stream) &rest options)
(declare (ignore options))
(comm:attach-ssl socket-stream :ssl-ctx t :ssl-side :client)
socket-stream)
There is however no method for MAKE-SSL-SERVER-STREAM.
Does anyone know how to write one? My take is you have
to use the :CTX-CONFIGURE-CALLBACK and :SSL-CONFIGURE-CALLBACK
methods to put in some info relating to the certificate and
password files into the stream, but I don't know enough details
on exactly what to do.
I tried this for kicks
(defmethod make-ssl-server-stream ((socket-stream bidirectional-binary-socket-stream) &rest options)
(declare (ignore options))
(flet ((ctx-configure-callback (ctx)
(comm:set-ssl-ctx-options ctx :all t))
(ssl-configure-callback (ssl)
(comm:ssl-use-certificate-file my-ssl "/tmp/ca.crt" COMM:SSL_FILETYPE_ASN1)))
(comm:attach-ssl socket-stream :ssl-ctx t :ssl-side :server
:ctx-configure-callback #'ctx-configure-callback
:ssl-configure-callback #'ssl-configure-callback))
socket-stream)
But that's as far as I got. This is incomplete because it doesn't
reference the key file "ca.key" (what aserve calls the :ssl-password
argument). Also, I have no idea what ctx-options I'm supposed to set.
If someone's already done this, or knows exactly how to do this, we
could remove the requirement for :cl-ssl entirely, at least under
lispworks, to provide HTTPS support.
Anyone? Please??? :-)
Thanks
--ap