.TH SECURITY-SSL 2
.SH NAME
ssl: connect, secret \- interface to the Secure Sockets Layer
.SH SYNOPSIS
.EX
bind '#D' /n/ssl

include "sys.m";
include "security.m";
ssl := load SSL SSL->PATH;

connect: fn(fd: ref Sys->FD): (string, ref Sys->Connection);
secret:  fn(c: ref Sys->Connection, secretin,
                secretout: array of byte): string;
.EE
.SH DESCRIPTION
.B SSL
provides an interface to the secure sockets layer device
.IR ssl (3).
It assumes that device has already been bound to
.BR /n/ssl ,
its conventional location in the name space.
.PP
.B Connect
pushes
file descriptor
.I fd
into
.BI /n/ssl/ n /data
and returns the resulting secure connection.
The value for
.I n
is internally read from
.BR /n/ssl/clone .
The string returned describes errors encountered, if any. If that string is non-nil, the connection is invalid.
.PP
.B Secret
writes
.I secretin
and
.I secretout
to
.BI /n/ssl/ n /secretin
and
.BI /n/ssl/ n /secretout
where
.I n
is obtained from the
.B Connection
adt
.IR c .
The string returned describes errors encountered, if any; otherwise it is nil.
.PP
.SH SOURCE
.B /appl/lib/ssl.b
.SH "SEE ALSO"
.IR security-auth (2),
.IR ssl (3)
