Annotation of embedaddon/libpdel/io/ssl_fp.3, revision 1.1

1.1     ! misho       1: .\" Copyright (c) 2001-2002 Packet Design, LLC.
        !             2: .\" All rights reserved.
        !             3: .\" 
        !             4: .\" Subject to the following obligations and disclaimer of warranty,
        !             5: .\" use and redistribution of this software, in source or object code
        !             6: .\" forms, with or without modifications are expressly permitted by
        !             7: .\" Packet Design; provided, however, that:
        !             8: .\" 
        !             9: .\"    (i)  Any and all reproductions of the source or object code
        !            10: .\"         must include the copyright notice above and the following
        !            11: .\"         disclaimer of warranties; and
        !            12: .\"    (ii) No rights are granted, in any manner or form, to use
        !            13: .\"         Packet Design trademarks, including the mark "PACKET DESIGN"
        !            14: .\"         on advertising, endorsements, or otherwise except as such
        !            15: .\"         appears in the above copyright notice or in the software.
        !            16: .\" 
        !            17: .\" THIS SOFTWARE IS BEING PROVIDED BY PACKET DESIGN "AS IS", AND
        !            18: .\" TO THE MAXIMUM EXTENT PERMITTED BY LAW, PACKET DESIGN MAKES NO
        !            19: .\" REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING
        !            20: .\" THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED
        !            21: .\" WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
        !            22: .\" OR NON-INFRINGEMENT.  PACKET DESIGN DOES NOT WARRANT, GUARANTEE,
        !            23: .\" OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS
        !            24: .\" OF THE USE OF THIS SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY,
        !            25: .\" RELIABILITY OR OTHERWISE.  IN NO EVENT SHALL PACKET DESIGN BE
        !            26: .\" LIABLE FOR ANY DAMAGES RESULTING FROM OR ARISING OUT OF ANY USE
        !            27: .\" OF THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY DIRECT,
        !            28: .\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE, OR CONSEQUENTIAL
        !            29: .\" DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF
        !            30: .\" USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY THEORY OF
        !            31: .\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
        !            32: .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
        !            33: .\" THE USE OF THIS SOFTWARE, EVEN IF PACKET DESIGN IS ADVISED OF
        !            34: .\" THE POSSIBILITY OF SUCH DAMAGE.
        !            35: .\"
        !            36: .\" Author: Archie Cobbs <archie@freebsd.org>
        !            37: .\"
        !            38: .\" $Id: ssl_fp.3,v 1.5 2004/06/02 17:24:37 archie Exp $
        !            39: .\"
        !            40: .Dd April 22, 2002
        !            41: .Dt SSL_FP 3
        !            42: .Os
        !            43: .Sh NAME
        !            44: .Nm ssl_fdopen ,
        !            45: .Nm ssl_log
        !            46: .Nd SSL utility routines
        !            47: .Sh LIBRARY
        !            48: PDEL Library (libpdel, \-lpdel)
        !            49: .Sh SYNOPSIS
        !            50: .In sys/types.h
        !            51: .In openssl/ssl.h
        !            52: .In pdel/io/ssl_fp.h
        !            53: .Ft "FILE *"
        !            54: .Fn ssl_fdopen "SSL_CTX *ssl_ctx" "int fd" "int server" "const char *mtype" "ssl_logger_t *logger" "void *logarg" "u_int timeout"
        !            55: .Ft void
        !            56: .Fn ssl_log "ssl_logger_t *logger" "void *arg"
        !            57: .Sh DESCRIPTION
        !            58: .Fn ssl_fdopen
        !            59: converts an encrypted SSL file descriptor into an unencrypted stream.
        !            60: When the returned stream is closed via
        !            61: .Xr fclose 3 ,
        !            62: so too is the underlying file descriptor.
        !            63: .Pp
        !            64: .Fa ssl_ctx
        !            65: is the SSL context.
        !            66: .Fa fd
        !            67: is the original file descriptor, over which the SSL protocol is spoken.
        !            68: .Fa server
        !            69: should be non-zero if the local side is the server.
        !            70: The stream's private state is allocated with
        !            71: .Xr typed_mem 3
        !            72: type
        !            73: .Fa mtype .
        !            74: An idle timeout may be specified by setting
        !            75: .Fa timeout
        !            76: to the number of seconds.
        !            77: .Pp
        !            78: .Fa logger ,
        !            79: if not
        !            80: .Dv NULL ,
        !            81: is a pointer to a logging function having this type:
        !            82: .Pp
        !            83: .Bd -literal -compact -offset 3n
        !            84: typedef void ssl_logger_t(void *arg, int sev, const char *fmt, ...);
        !            85: .Ed
        !            86: .Pp
        !            87: The
        !            88: .Fa logarg
        !            89: is passed to
        !            90: .Fn logger
        !            91: as
        !            92: .Fa arg .
        !            93: .Fa sev
        !            94: is a
        !            95: .Xr syslog 3
        !            96: severity level, and
        !            97: .Fa fmt
        !            98: is a
        !            99: .Xr printf 3
        !           100: like format string with subsequent arguments.
        !           101: .Pp
        !           102: .Fn ssl_log
        !           103: is a routine for logging any SSL error.
        !           104: It takes a
        !           105: .Fa logger
        !           106: and
        !           107: .Fa arg
        !           108: as specified above.
        !           109: .Sh RETURN VALUES
        !           110: .Fn ssl_fdopen
        !           111: returns
        !           112: .Dv NULL
        !           113: if an error occurs, with
        !           114: .Va errno
        !           115: set appropriately.
        !           116: .Sh SEE ALSO
        !           117: .Xr libpdel 3 ,
        !           118: .Xr syslog 3 ,
        !           119: .Xr typed_mem 3
        !           120: .Sh HISTORY
        !           121: The PDEL library was developed at Packet Design, LLC.
        !           122: .Dv "http://www.packetdesign.com/"
        !           123: .Sh AUTHORS
        !           124: .An Archie Cobbs Aq archie@freebsd.org

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>