Skip to content

Commit

Permalink
doc: correct the SSL_CTX_set_info_callback(3) manual page
Browse files Browse the repository at this point in the history
The info callback is not prototyped correctly, and the code
example fails to compile because of const-incorrectness.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from #22224)

(cherry picked from commit 92986c0)
  • Loading branch information
mspncp authored and t8m committed Oct 2, 2023
1 parent 553d3c0 commit 992d24d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions doc/man3/SSL_CTX_set_info_callback.pod
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ SSL_get_info_callback

#include <openssl/ssl.h>

void SSL_CTX_set_info_callback(SSL_CTX *ctx, void (*callback)());
void (*SSL_CTX_get_info_callback(const SSL_CTX *ctx))();
void SSL_CTX_set_info_callback(SSL_CTX *ctx,
void (*callback) (const SSL *ssl, int type, int val));

void SSL_set_info_callback(SSL *ssl, void (*callback)());
void (*SSL_get_info_callback(const SSL *ssl))();
void (*SSL_CTX_get_info_callback(SSL_CTX *ctx)) (const SSL *ssl, int type, int val);

void SSL_set_info_callback(SSL *ssl,
void (*callback) (const SSL *ssl, int type, int val));

void (*SSL_get_info_callback(const SSL *ssl)) (const SSL *ssl, int type, int val);

=head1 DESCRIPTION

Expand Down Expand Up @@ -119,7 +123,7 @@ SSL_get_info_callback() returns the current setting.
The following example callback function prints state strings, information
about alerts being handled and error messages to the B<bio_err> BIO.

void apps_ssl_info_callback(SSL *s, int where, int ret)
void apps_ssl_info_callback(const SSL *s, int where, int ret)
{
const char *str;
int w = where & ~SSL_ST_MASK;
Expand Down

0 comments on commit 992d24d

Please sign in to comment.