When is EVP_MD_CTX_reset() needed?
Hal Murray
halmurray+openssl at sonic.net
Sun Feb 12 00:12:13 UTC 2023
I'm expecting the answer to be "not in your use case" but I'm fishing for
something I might have overlooked.
The man page says:
EVP_MD_CTX_reset()
Resets the digest context ctx. This can be used to reuse an
already existing context.
I have a subroutine that does:
EVP_DigestInit_ex
EVP_DigestUpdate
EVP_DigestFinal_ex
That code is reusing a ctx. The init often gets a new digest. It works
without the reset.
What does "reuse" mean? When would EVP_MD_CTX_reset() be necessary?
--
These are my opinions. I hate spam.
More information about the openssl-users
mailing list