[plt-scheme] FYI: openssl driver available

From: Adam Wick (awick at cs.utah.edu)
Date: Fri Jan 31 19:19:57 EST 2003

I have committed and tagged an OpenSSL driver for PLT Scheme into the CVS
archive. It has been tested under FreeBSD and Mac OS/X (>=10.2). It has not
been tested under Linux, as far as I know, but I'm guessing it should work fine.
At the moment, no support is available for Windows. Further, this library
is not currently compatible with 3m (precise collection) versions of PLT
Scheme. We're working on that, however.

This driver is in the collects directory of the CVS archive, and can be 
loaded as follows:

> (require (lib "openssl.ss" "openssl"))

This driver supports the easy use of OpenSSL connections in PLT Scheme
programs, as follows:

> (ssl-connect hostname-string port-number [encryption-flag]) -> two values

Ssl-connect works much like tcp-connect, with a few notable changes. First,
the connection is encrypted using the OpenSSL libraries. Second, the port 
number is no longer optional; it must be included in the call. Finally, 
ssl-connect takes an optional flag. The value of this flag must be one of
the following symbols: 'ssl-v2-or-v3 (the default, use the SSL protocol 
version 2 or 3 depending on the capabilities of the server), 'sslv2 (use
only version 2), 'sslv3 (use only version 3), or 'tls (use the TLS protocol,
version 1).

The two returned values are an input port and an output port, as with 

An enable-break version (ssl-connect/enable-break) is also available. See
the documentation in ${PLTHOME}/collects/openssl/ for more information.

This commit required minor changes to several other libraries. In the net
collection, the following additional connection functions were added to the
appropriate libraries:

> (smtp-send-message* inport outport from-string to-list header message-list)
> (connect-to-server* inport outport) -> communicator (from the nntp library)
> (connect-to-server* inport outport) -> communicator (from the pop3 library)
> (imap-connect* inport outport username password folder) -> imap, count, count
> (ftp-establish-connection* inport outport user password) -> ftp-conn

These functions work as their unstarred counterparts, except that they take
an input and output port instead of a hostname and numeric port number. This
allows use of these protocols through an encrypted SSL session.

Finally, SirMail has been modified to support SSL connections to mail servers.
A checkbox now exists in the preferences panel to turn this on.


Posted on the users mailing list.