Hi,
I'm always one for forgetting to give things back
that I've used, like memory in my programs :-(
I'm beginning to get to grips with openssl but
before I proceed I would like a few pointers on freeing memory within
openssl.
If I consider the program below there are a few
things I need to load before I can use the openssl functions, do I the have to
relase them after use with some function? Second I understand the freeing of the
x509 cert but are there other freeing functions? For example for subject
name?
Any help much appreciated.
/colin
X509 *cert = NULL;
X509_NAME *name = NULL; SSLeay_add_all_algorithms(); ERR_load_crypto_strings(); cert = d2i_X509(NULL, (unsigned char
**)&szBuffer, 655);
name =
X509_get_subject_name(cert);
X509_free(cert);
|