SSL_set_info_callback with argument

Matt Caswell matt at
Thu Feb 10 11:48:51 UTC 2022

On 09/02/2022 21:49, Tal Dery wrote:
> Hi,
> SSL_set_info_callbacknot accepting any argument, is there an elegant 
> solution to get an argumentin the callback?

You can set arbitrary application data on the SSL object using 
`SSL_set_app_data` and retrieve it again using `SSL_get_app_data`.

The SSL object also has support for the very similar, but slightly more 
capable, "ex_data" interface - which also enables you to associate 
arbitrary application data with an SSL object.

See these man pages for info on ex_data:


More information about the openssl-users mailing list