Hi, all, I am writing some programs using openssl 0.9.6 and get some puzzling questions about reference count in the SSL session. Basically, I am looking into the internal data structure of SSL_SESSION:
... int references; } SSL_SESSION; as defined in openssl/ssl.h And from my understanding of ssl source code, the field is indeed used for reference counting purpose (if it drops to zero, the whole structure is freed). What is puzzling is that when a fresh SSL_connect() succeeds, I use SSL_get_session() to retrieve the SSL_SESSION point, and prints the references field, it is 2. After I call SSL_free(), it is 1. There is no sharing of session whatsoever (one connection in my program). Does this mean there is memory leak for the session object? Or there is some magic somewhere else? Or my understanding is not correct? Any suggestion/help is welcomed. Thanks. -- ~~~~~~~~~~~~~~~~~~~~ Haihong Wang Software Engineer Voice: 408-853-6974 Email: [EMAIL PROTECTED] Cisco Systems, Inc. ~~~~~~~~~~~~~~~~~~~~ ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]