| SSL(3) | Library Functions Manual | SSL(3) |
ssl - secure sockets layer device
#D/clone
#D/n
#D/n/data
#D/n/ctl
#D/n/secretin
#D/n/secretout
#D/n/encalgs
#D/n/hashalgs
The ssl device provides access to a Secure Socket Layer that implements the record layer protocol of SSLv2 (but not its handshaking). The device provides encrypting and digesting for many independent connections. Once associated with a network connection, the ssl device can be thought of as a filter for the connection. Ssl can send data in the clear, digested or encrypted. In all cases, if ssl is associated with both ends of a connection, all messages are delimited. As long as reads always specify buffers that are of equal or greater lengths than the writes at the other end of the connection, one write will correspond to one read. The device is unusual because it is not bound into the name space but named directly by its local name, #D. That is because the interface described below requires writing a local file descriptor number to a file, which will not work remotely.
The top-level directory contains a clone file and numbered directories, each representing a connection. Opening the clone file reserves a connection; the file descriptor resulting from the sys-open (2) will be open on the control file, ctl, in the directory that represents the new connection. Reading the control file will return a text string giving the connection number n, and thus the directory name.
Writing to ctl controls the corresponding connection. The following control messages are possible:
Files secretin and secretout must be written before digesting or encryption is turned on. If only one is written, they are both assumed to be the same.
The mode may be changed at any time during a connection.
The list of algorithms supported by a given implementation of ssl may be read from the read-only text files encalgs (encryption algorithms) and hashalgs (hashing algorithms for digests). Each contains a space-separated list of algorithm names.
security-ssl (2)
B. Schneier, Applied Cryptography , 1996, J. Wiley & Sons, Inc.