Who can tell me what is the mechnism of ex_data in libcrypto of openssl.
 
In ex_data.c of openssl-0.9.5 source code, I found the following interface to set and get ex_data
 
CRYPTO_get_ex_new_index
CRYPTO_set_ex_data
CRYPTO_get_ex_data
 
in openssl source code , first we should call  CRYPTO_get_ex_new_index  to register one index of  one kind of ex_data.
then we call CRYPTO_set_ex_data to set ex_data , so when we want to use this ex_data , we use CRYPTO_get_ex_data to get it.
 
But In source code , these is no interface to free the memory malloced for the second param ( STACK* skp) by CRYPTO_get_ex_new_index ,
and the return value is a simply copy of  the first param( int idx ).
 
But I donot know if  I am right or these code has latent usage.

Reply via email to