I've got some code that dynamically allocates an X509 object using PEM_read_X509 and then extracts some data from it.
The problem is the object never gets freed. I tried to call free() on the X509 pointer but that doesn't work either because it has dynamically allocated sub structures. Is there any nice abstracted function for freeing these objects or do I have to dive into the struct itself and manually free everything? (which might all the sudden not work anymore if a new version of openssl comes out that changes the struct) I looked around in the x509 headers and didn't see anything. Thanks!