X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=lib%2Fopenssl%2Fdoc%2Fssl%2FSSL_CTX_set_info_callback.pod;h=f36f217e3bde4dd9a7f8bb42d5f7bbbf960aa9c3;hb=02ed66432c92de70694700164f986190aad3cbc5;hp=0b4affd5eb1a5119afb7d51db4b8bb0ea585e687;hpb=89016837dcbf2775cd15dc8cbaba00dc6379f86e;p=cassiopeia.git diff --git a/lib/openssl/doc/ssl/SSL_CTX_set_info_callback.pod b/lib/openssl/doc/ssl/SSL_CTX_set_info_callback.pod index 0b4affd..f36f217 100644 --- a/lib/openssl/doc/ssl/SSL_CTX_set_info_callback.pod +++ b/lib/openssl/doc/ssl/SSL_CTX_set_info_callback.pod @@ -20,7 +20,7 @@ SSL_CTX_set_info_callback() sets the B function, that can be used to obtain state information for SSL objects created from B during connection setup and use. The setting for B is overridden from the setting for a specific SSL object, if specified. -When B is NULL, not callback function is used. +When B is NULL, no callback function is used. SSL_set_info_callback() sets the B function, that can be used to obtain state information for B during connection setup and use. @@ -93,10 +93,10 @@ Callback has been called because a handshake is finished. =back The current state information can be obtained using the -L family of functions. +L family of functions. The B information can be evaluated using the -L family of functions. +L family of functions. =head1 RETURN VALUES @@ -110,44 +110,53 @@ The following example callback function prints state strings, information about alerts being handled and error messages to the B BIO. void apps_ssl_info_callback(SSL *s, int where, int ret) - { - const char *str; - int w; - - w=where& ~SSL_ST_MASK; - - if (w & SSL_ST_CONNECT) str="SSL_connect"; - else if (w & SSL_ST_ACCEPT) str="SSL_accept"; - else str="undefined"; - - if (where & SSL_CB_LOOP) - { - BIO_printf(bio_err,"%s:%s\n",str,SSL_state_string_long(s)); - } - else if (where & SSL_CB_ALERT) - { - str=(where & SSL_CB_READ)?"read":"write"; - BIO_printf(bio_err,"SSL3 alert %s:%s:%s\n", - str, - SSL_alert_type_string_long(ret), - SSL_alert_desc_string_long(ret)); - } - else if (where & SSL_CB_EXIT) - { - if (ret == 0) - BIO_printf(bio_err,"%s:failed in %s\n", - str,SSL_state_string_long(s)); - else if (ret < 0) - { - BIO_printf(bio_err,"%s:error in %s\n", - str,SSL_state_string_long(s)); - } - } - } + { + const char *str; + int w; + + w = where & ~SSL_ST_MASK; + + if (w & SSL_ST_CONNECT) str = "SSL_connect"; + else if (w & SSL_ST_ACCEPT) str = "SSL_accept"; + else str = "undefined"; + + if (where & SSL_CB_LOOP) + { + BIO_printf(bio_err, "%s:%s\n", str, SSL_state_string_long(s)); + } + else if (where & SSL_CB_ALERT) + { + str = (where & SSL_CB_READ) ? "read" : "write"; + BIO_printf(bio_err, "SSL3 alert %s:%s:%s\n", + str, + SSL_alert_type_string_long(ret), + SSL_alert_desc_string_long(ret)); + } + else if (where & SSL_CB_EXIT) + { + if (ret == 0) + BIO_printf(bio_err, "%s:failed in %s\n", + str, SSL_state_string_long(s)); + else if (ret < 0) + { + BIO_printf(bio_err, "%s:error in %s\n", + str, SSL_state_string_long(s)); + } + } + } =head1 SEE ALSO -L, L, -L +L, L, +L + +=head1 COPYRIGHT + +Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved. + +Licensed under the OpenSSL license (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +L. =cut