On Tue, Mar 22, 2011 at 08:47:55PM -0700, Claus Assmann wrote: > On Tue, Mar 22, 2011, Victor Duchovni wrote: > > > > client() has some code like this: > > > SSL_CTX_set_ex_data(a_ctx->a_ssl_ctx, myidx, a_ctx->cb_arg); > > > > No, don't do that, the SSL_CTX application context object is global. > > I was demonstrating that the callback API has some problems.
Well, two different ways of handling application context in callbacks, but neither is fatally flawed. There is some sanity here, as sessions are complicated beasts, that can potentially be decorated with multiple bits of context as the same session gets used in multiple ways, while only one "master" can be responsible for certificate verification at a time. The difference in the API is perhaps not entirely capricious. -- Viktor. ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager majord...@openssl.org