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 +0000, 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":I fail to see the point. You don't need to pass the data, only a pointer to the data. Well ... obviously ... Any time you set the callback, you can set the callback-arg. How? As Shalu quoted, the prototype of the call to set the callback is
How do we specify a user-defined callback data pointer in that call? When the callback is called it is given the arg; Where? According to the prototype which Shalu quoted the callback gets just a pointer to an SSL and a pointer to an SSL_SESSION; neither of those is a user-defined data pointer. if the arg was a pointer you can deref to get the data... which could have been manipulated as needed in the interim. Using the ex_data facility is not needed. I may be missing something, but I can't see any other way to do it. -- J. J. Farrell Not speaking for Oracle |