Arguments: socket &key method certificate key certificate-password method verify max-depth ca-file ca-directory
The keyword arguments other than method were added in an update release in March 2007. The arguments of this function are now the same as the arguments to make-ssl-server-stream.
The method keyword argument was added in a 7.0 update but was inadvertantly not documented. The documentation was changed in a doc update released in September, 2006.
This function is not available in all versions. Generally, you must
have an Enterprise license to use this function. Also, you must have
the OpenSSL libraries installed for this facility to work. Note that
shared library versions of the OpenSSL libraries (required by Allegro
CL) are not available on all platforms. The SSL functionality is in
the ssl module. To ensure it is loaded, evaluate
(require :ssl). Calling this function automatically
loads the module.
This function creates and returns a new SSL client socket stream that communicates using SSL via the given socket. Once this function is called and an SSL socket stream is returned, no I/O calls should be done directly to socket. Note that closing the SSL socket stream will result in the original socket file descriptor being closed as well. Therefore, the idiomatic way to establish an SSL client socket stream is:
;; SOCK is already a socket: (setf sock (make-ssl-client-stream sock ...))
Unless ssl-do-handshake is called, the secure connection isn't negotiated until the first byte is sent through the SSL socket stream to the underlying stream (and this will usually occur when the first force-output is done to the SSL socket stream). Calling ssl-do-handshake causes the secure connection to be negotiated immediately.
When that first write is done a negotiation process is begun that involves reads and writes. This negotiation process will not occur if the SSL socket on the other end of the connection is not sitting waiting for data to arrive. Thus if you create two connected sockets in a single Lisp process, and make one the client and the other the server, and then write to the client side the Lisp will hang since the server side socket isn't being read. You can make this work if you use the Lisp multiprocessing facility (see multiprocessing.htm) to cause the server socket to be read at the same time that the write to the client socket is being done.
The method keyword argument can be
:sslv23 (the default) or :tlsv1.
:sslv23 means that the client will negotiate either
SSL version 2 or SSL version 3 with the server. The highest version
that is common between the client and server will be selected. If you
get unexpected disconnects after creating a secure stream using
make-ssl-client-stream, you may need to
use :tlsv1.
Use :tlsv1 when dealing with a server that speaks
only TLS.
make-ssl-client-stream's keyword arguments are the same as make-ssl-server-stream's. The remaining keyword arguments to make-ssl-client-stream are:
nil, :optional, or
:required. Due to the way OpenSSL is implemented,
the behavior of peer verification differs for clients and
servers. Here we describe the behavior for clients. See make-ssl-server-stream for a
discussion of the server behavior.
See make-ssl-server-stream. See also socket.htm for information on sockets. For information on Secure Sockets, see the section Secure Socket Layer (SSL) in that document.
Copyright (c) 1998-2008, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.0. This page was not revised from the 7.0 page.
Created 2005.12.9.
| Allegro CL version 8.0 Unrevised from 7.0 to 8.0.Documentation for Allegro CL version 8.0. The object described on this page has been modified in the 8.0 release; see the Release Notes. | |||||||||