Closed mkm85 closed 7 years ago
looking...
Scratch that. I looked at the code for HMAC_CTX_reset()
. It reallocated everything from the heap, so the allocation can't be avoided.
I iterated through different ways to do this, but what you have is fine. Just initialize all structs with ={};
and all pointers as NULL or to something valid.
It could be nicer with the hmac abstracted away with three different implementations available
Definitely could use a better abstraction. Go for it. I'll likely pull in what you have done this weekend.
Thanks for doing this!
merged and done. Thanks again.
fixed that compilation fails with newer openssl versions while retaining compatibility for older versions. If older versions are not a priority this code could be cleaner.