<html><head></head><body><div class="ydp72cddb32yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div></div>
        <div><div><div style="color: rgb(0, 0, 0); font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 16px;"><font size="2">Actually while setting the callback, we can not pass the user-defined/application data. For example: </font></div><div style="color: rgb(0, 0, 0); font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 16px;"><font size="2">void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx,</font></div><div style="color: rgb(0, 0, 0); font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 16px;"><font size="2">                             int (*new_session_cb)(SSL *, SSL_SESSION *));</font></div><div style="color: rgb(0, 0, 0); font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 16px;"><font size="2"><br></font></div><div style="color: rgb(0, 0, 0); font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 16px;"><font size="2">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.</font></div></div><br></div><div><br></div>
        
        </div><div id="yahoo_quoted_0362610284" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Sunday, 9 June, 2019, 8:27:46 pm IST, Jeremy Harris <jgh@wizmail.org> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div dir="ltr">On 09/06/2019 11:31, shalu dhamija wrote:<div class="yqt1644126510" id="yqtfd74009"><br clear="none">> 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.</div><br clear="none"><br clear="none">When the callback is called, the arg you set is given to the callback<br clear="none">function, as a function argument.  It's not intended as a general-<br clear="none">purpose data stash.<br clear="none"><br clear="none">-- <br clear="none">Cheers,<br clear="none">  Jeremy<div class="yqt1644126510" id="yqtfd36286"><br clear="none"></div></div></div>
            </div>
        </div></body></html>