Re: Query related to SSL_CTX_set_msg_callback_arg

2019-06-10 Thread Viktor Dukhovni
> On Jun 10, 2019, at 10:54 AM, Jeremy Harris wrote: > >> |void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx, int (*new_session_cb)(SSL *, >> SSL_SESSION *));| >> >> >> How do we specify a user-defined callback data pointer in that call? > > You don't; you additionally use > SSL_CTX_set_msg_callback_

Re: Query related to SSL_CTX_set_msg_callback_arg

2019-06-10 Thread Jeremy Harris
On 10/06/2019 15:21, J. J. Farrell wrote: > |void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx, int (*new_session_cb)(SSL *, > SSL_SESSION *));| > > > How do we specify a user-defined callback data pointer in that call? You don't; you additionally use SSL_CTX_set_msg_callback_arg() which the OP said h

Re: Query related to SSL_CTX_set_msg_callback_arg

2019-06-10 Thread J. J. Farrell
On 10/06/2019 11:05, Jeremy Harris wrote: On 10/06/2019 09:32, Viktor Dukhovni wrote: On Mon, Jun 10, 2019 at 07:16:26AM +, shalu dhamija via openssl-users wrote: Actually while setting the callback, we can not pass the user-defined/application data. You can however attach it to the SSL

Re: Query related to SSL_CTX_set_msg_callback_arg

2019-06-10 Thread Jeremy Harris
On 10/06/2019 09:32, Viktor Dukhovni wrote: > On Mon, Jun 10, 2019 at 07:16:26AM +, shalu dhamija via openssl-users > wrote: > >> Actually while setting the callback, we can not pass the >> user-defined/application data. > > You can however attach it to the SSL connection handle as "ex_dat

Re: Query related to SSL_CTX_set_msg_callback_arg

2019-06-10 Thread Viktor Dukhovni
On Mon, Jun 10, 2019 at 07:16:26AM +, shalu dhamija via openssl-users wrote: > Actually while setting the callback, we can not pass the > user-defined/application data. You can however attach it to the SSL connection handle as "ex_data": https://github.com/vdukhovni/postfix/blob/maste

Re: Query related to SSL_CTX_set_msg_callback_arg

2019-06-10 Thread shalu dhamija via openssl-users
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 gettin

Re: Query related to SSL_CTX_set_msg_callback_arg

2019-06-09 Thread Jeremy Harris
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 op