GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
SSL_FP(3) FreeBSD Library Functions Manual SSL_FP(3)

ssl_fdopen, ssl_log
SSL utility routines

PDEL Library (libpdel, -lpdel)

#include <sys/types.h>
#include <openssl/ssl.h>
#include <pdel/io/ssl_fp.h>

FILE *
ssl_fdopen(SSL_CTX *ssl_ctx, int fd, int server, const char *mtype, ssl_logger_t *logger, void *logarg, u_int timeout);

void
ssl_log(ssl_logger_t *logger, void *arg);

ssl_fdopen() converts an encrypted SSL file descriptor into an unencrypted stream. When the returned stream is closed via fclose(3), so too is the underlying file descriptor.

ssl_ctx is the SSL context. fd is the original file descriptor, over which the SSL protocol is spoken. server should be non-zero if the local side is the server. The stream's private state is allocated with typed_mem(3) type mtype. An idle timeout may be specified by setting timeout to the number of seconds.

logger, if not NULL, is a pointer to a logging function having this type:

typedef void ssl_logger_t(void *arg, int sev, const char *fmt, ...);

The logarg is passed to logger() as arg. sev is a syslog(3) severity level, and fmt is a printf(3) like format string with subsequent arguments.

ssl_log() is a routine for logging any SSL error. It takes a logger and arg as specified above.

ssl_fdopen() returns NULL if an error occurs, with errno set appropriately.

libpdel(3), syslog(3), typed_mem(3)

The PDEL library was developed at Packet Design, LLC. http://www.packetdesign.com/

Archie Cobbs ⟨archie@freebsd.org⟩
April 22, 2002 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.