Merged requested to merge 3795-speed-up-EVP_DigestInit_ex-v9_18 into v9_18
The implicit algorithm fetch causes a lock contention and significant slowdown for small input buffers. For more details, see:
Instead of using EVP_DigestInit_ex() initialize empty MD_CTX objects for each algorithm and use EVP_MD_CTX_copy_ex() to initialize MD_CTX from a static copy. Additionally avoid implicit algorithm fetching by using EVP_MD_fetch() for OpenSSL 3.0.
(cherry picked from commit e6bfb8e4)
Closes #3795 (closed)
Backport of MR !7375 (merged)