I still have another question, how can I read the reference counter of a
SSL_SESSION object? If I can read it, I could know if another task is
using the SESSION. It could prevent me from deleting the pointer to the
SESSION.
Regards,
Alexis
Alexis Lefort a écrit :
Hello all,
I am doing, in C language, a SSL client with openSSL 0.9.7g
I have multiple clients (about 10) using the same SSL_CTX and
connecting to 2 different servers. (5 clients on each for example).
I wonder how SSL_get_session, SSL_set_session ans SSL_SESSION_free
have to be used there.
What I did was about (for each client):
if (session for server A in cache) {
SSL_set_session(ssl, session)
SSL_SESSION_free(session)
}
if (SSL_connect (ssl) == OK)
session = SSL_get1_session(ssl)
....
SSL_shutdown (ssl)
But I fear problems with other threads :
- will memory be freed when one client does a new handshake ?
- will session be kept as it is valid ?
Please help :)
Ce message et toutes les pièces jointes sont confidentiels et établis a
l'intention exclusive de ses destinataires. Toute modification, édition,
utilisation ou diffusion non autorisée est interdite. Tout message
électronique est susceptible d'altération. CXR Anderson Jacobson décline
toute responsabilité au titre de ce message s'il a été altéré, déformé,
falsifié, édité ou diffusé sans autorisation.
This message and any attachments are confidential and intended solely
for the addressees. Any unauthorised alteration, printing, use or
dissemination is prohibited. E-mails are susceptible to alteration. CXR
Anderson Jacobson shall not be liable for the message if altered,
changed, falsified, printed or disseminated without authorisation.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager [EMAIL PROTECTED]
--
Alexis Lefort
Ingenieur departement etudes
Tel: +33 (0)2 37 62 88 88
Fax: +33 (0)2 37 62 88 01
CXR - Rue de l'Ornette - 28410 ABONDANT
[EMAIL PROTECTED]
http://cxr.anderson-jacobson.com/
Ce message et toutes les pièces jointes sont confidentiels et établis a
l'intention exclusive de ses destinataires. Toute modification, édition,
utilisation ou diffusion non autorisée est interdite. Tout message
électronique est susceptible d'altération. CXR Anderson Jacobson décline
toute responsabilité au titre de ce message s'il a été altéré, déformé,
falsifié, édité ou diffusé sans autorisation.
This message and any attachments are confidential and intended solely
for the addressees. Any unauthorised alteration, printing, use or
dissemination is prohibited. E-mails are susceptible to alteration. CXR
Anderson Jacobson shall not be liable for the message if altered,
changed, falsified, printed or disseminated without authorisation.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager [EMAIL PROTECTED]