Non-heap based structures
philipp_subx at redfish-solutions.com
Wed Jul 27 05:42:13 UTC 2022
I suspect I already know the answer, but... is there a way to have a non-heap based structure like EVP_MD_CTX?
If I don't want to have one be malloc'd (or OPENSSL_zalloc'd as the case may be), I can't have one be a stack variable or static, can I?
I ask because I'm trying to replace some existing code that has no path to handle out-of-memory exceptions if EVP_MD_CTX_create() ever returns NULL...
I guess the point of crypto/evp/evp_local.h is to completely hide details of the structure, including its size... so the answer to the original question is probably "no". But I just wanted to make sure.
More information about the openssl-users