Manual Pages for UNIX Darwin command on man SSL_CTX_set_msg_callback
MyWebUniversity

Manual Pages for UNIX Darwin command on man SSL_CTX_set_msg_callback

SSLCTXsetmsgcallback(3) OpenSSL SSLCTXsetmsgcallback(3)

NAME

SSLCTXsetmsgcallback, SSLCTXsetmsgcallbackarg,

SSLsetmsgcallback, SSLgetmsgcallbackarg - install callback for

observing protocol messages

SYNOPSIS

#include

void SSLCTXsetmsgcallback(SSLCTX *ctx, void (*cb)(int writep, int version, int contenttype, const void *buf, sizet len, SSL *ssl, void *arg)); void SSLCTXsetmsgcallbackarg(SSLCTX *ctx, void *arg); void SSLsetmsgcallback(SSLCTX *ctx, void (*cb)(int writep, int version, int contenttype, const void *buf, sizet len, SSL *ssl, void *arg)); void SSLsetmsgcallbackarg(SSLCTX *ctx, void *arg);

DESCRIPTION

SSLCTXsetmsgcallback() or SSLsetmsgcallback() can be used to define a message callback function cb for observing all SSL/TLS protocol messages (such as handshake messages) that are received or sent. SSLCTXsetmsgcallbackarg() and SSLsetmsgcallbackarg() can be used to set argument arg to the callback function, which is available for arbitrary application use. SSLCTXsetmsgcallback() and SSLCTXsetmsgcallbackarg() specify default settings that will be copied to new SSSSLL objects by SSLnew(3). SSLsetmsgcallback() and SSLsetmsgcallbackarg() modify the actual settings of an SSSSLL object. Using a 00 pointer for cb disables the message callback. When cb is called by the SSL/TLS library for a protocol message, the function arguments have the following meaning: writep This flag is 00 when a protocol message has been received and 11 when a protocol message has been sent. version The protocol version according to which the protocol message is interpreted by the library. Currently, this is one of SSSSLL22VVEERRSSIIOONN, SSSSLL33VVEERRSSIIOONN and TTLLSS11VVEERRSSIIOONN (for SSL 2.0, SSL 3.0 and TLS 1.0, respectively). contenttype In the case of SSL 2.0, this is always 00. In the case of SSL 3.0 or TLS 1.0, this is one of the CCoonntteennttTTyyppee values defined in the protocol specification (cchhaannggeecciipphheerrssppeecc((2200)), aalleerrtt((2211)), hhaannddsshhaakkee((2222)); but never aapppplliiccaattiioonnddaattaa((2233)) because the callback will only be called for protocol messages). buf, len buf points to a buffer containing the protocol message, which consists of len bytes. The buffer is no longer valid after the callback function has returned. ssl The SSSSLL object that received or sent the message.

arg The user-defined argument optionally defined by

SSLCTXsetmsgcallbackarg() or SSLsetmsgcallbackarg(). NNOOTTEESS Protocol messages are passed to the callback function after decryption and fragment collection where applicable. (Thus record boundaries are not visible.) If processing a received protocol message results in an error, the callback function may not be called. For example, the callback function will never see messages that are considered too large to be processed. Due to automatic protocol version negotiation, version is not necessarily the protocol version used by the sender of the message: If

a TLS 1.0 ClientHello message is received by an SSL 3.0-only server,

version will be SSSSLL33VVEERRSSIIOONN.

SEE ALSO

ssl(3), SSLnew(3) HISTORY SSLCTXsetmsgcallback(), SSLCTXsetmsgcallbackarg(), SSLsetmsgcallback() and SSLgetmsgcallbackarg() were added in OpenSSL 0.9.7.

0.9.7l 2002-08-15 SSLCTXsetmsgcallback(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™