You might want to take a look into SSL_CTX_set_ex_data() and
SSL_set_ex_data().
- Ariel
Nilsson, Thomas via RT wrote:
Hi,
I develop a multithreaded application that would benefit from adding a
userdata argument to the callback functions that you can set using the
following openssl functions:
SSL_CTX_set_tmp_rsa_callback
SSL_CTX_set_verify
Currently I have to set thread specific data and look up the session
variable every time the callback functions are called.
I think it would be much better if there was a possibility to set a
userdata argument that was supplied by openssl when the callbacks were
called.
Current usage:
---------------------
static int ssl_open_verify (int ok,X509_STORE_CTX *ctx); /* function
uses Thread local storage to lookup application userdata */
static RSA *ssl_genkey (SSL *con,int export,int keylength); /* function
uses Thread local storage to lookup application userdata */
SSL_CTX_set_tmp_rsa_callback (context,ssl_genkey);
SSL_CTX_set_verify (context,SSL_VERIFY_PEER,ssl_open_verify);
If enhancement implemented:
----------------------------------------
static int ssl_open_verify (int ok,X509_STORE_CTX *ctx, void *userdata);
static RSA *ssl_genkey (SSL *con,int export,int keylength, void
*userdata);
SSL_CTX_set_tmp_rsa_callback_userdata (context,ssl_genkey, userdata);
SSL_CTX_set_verify_userdata (context,SSL_VERIFY_PEER,ssl_open_verify,
userdata);
Best regards,
Thomas Nilsson
Software Engineer, StreamServe
------------------------------------------------------------------------
Hi,
I develop a multithreaded application that would benefit from adding a
userdata argument to the callback functions that you can set using the
following openssl functions:
SSL_CTX_set_tmp_rsa_callback
SSL_CTX_set_verify
Currently I have to set thread specific data and look up the session
variable every time the callback functions are called.
I think it would be much better if there was a possibility to set a
userdata argument that was supplied by openssl when the callbacks were
called.
Current usage:
---------------------
static int ssl_open_verify (int ok,X509_STORE_CTX *ctx); /* function
uses Thread local storage to lookup application userdata */
static RSA *ssl_genkey (SSL *con,int export,int keylength); /*
function uses Thread local storage to lookup application userdata */
SSL_CTX_set_tmp_rsa_callback (context,ssl_genkey);
SSL_CTX_set_verify (context,SSL_VERIFY_PEER,ssl_open_verify);
If enhancement implemented:
----------------------------------------
static int ssl_open_verify (int ok,X509_STORE_CTX *ctx, void *userdata);
static RSA *ssl_genkey (SSL *con,int export,int keylength, void
*userdata);
SSL_CTX_set_tmp_rsa_callback_userdata (context,ssl_genkey, userdata);
SSL_CTX_set_verify_userdata (context,SSL_VERIFY_PEER,ssl_open_verify,
userdata);
Best regards,
Thomas Nilsson
Software Engineer, StreamServe
--
- Ariel Salomon / Senior Software Engineer
Real-Time Innovations (RTI) / www.rti.com
408 990-7439 / [EMAIL PROTECTED]
RTI - The Real-Time Middleware Experts
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [email protected]
Automated List Manager [EMAIL PROTECTED]