Query related to SSL_CTX_set_msg_callback_arg
dhamija_shalu at yahoo.com
Mon Jun 10 07:16:26 UTC 2019
Actually while setting the callback, we can not pass the user-defined/application data. For example: void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx, int (*new_session_cb)(SSL *, SSL_SESSION *));
When the callback arrives, I have SSL* and SSL_SESSION*. Earlier I was getting it from the 'msg_callback_arg' of SSL pointer but in the openssl1.1.1, SSL structure is no longer accessible.
On Sunday, 9 June, 2019, 8:27:46 pm IST, Jeremy Harris <jgh at wizmail.org> wrote:
On 09/06/2019 11:31, shalu dhamija wrote:
> Hi All,In openssl 1.0.2, I was using SSL_CTX_set_msg_callback_arg() API to set the application specific argument. And in the callback, I was retrieving that argument from SSL pointer received in the callback e.g. "ssl->msg_callback_arg"But in openssl1.1.1, the SSL structure members are no more accessible. And I did not find any API to get the msg_callback_arg back. Can someone please comment on this if there is any way to get the msg_callback_arg back in the callbacks from ssl pointer.
When the callback is called, the arg you set is given to the callback
function, as a function argument. It's not intended as a general-
purpose data stash.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the openssl-users