openssl icon indicating copy to clipboard operation
openssl copied to clipboard

Add CTX copy function for EVP_MD to optimize the performance of EVP_MD_CTX_copy_ex

Open bangcheng opened this issue 4 months ago • 5 comments

  1. Add OSSL_FUNC_digest_copyctx_fn function for EVP_MD, which is used to copy algctx from the old EVP_MD_CTX to the new one.

  2. Add implementation of OSSL_FUNC_digest_copyctx_fn function for default providers.

  3. Modify EVP_MD_CTX_copy_ex: When the fetched digest is the same in in and out contexts, use the copy function to copy the members in EVP_MD_CTX if the OSSL_FUNC_digest_copyctx_fn function exists. Otherwise, use the previous method to copy.

CLA:trivial

Fixes #25703

bangcheng avatar Oct 17 '24 13:10 bangcheng