CVSROOT: /cvs Module name: src Changes by: t...@cvs.openbsd.org 2022/01/09 08:15:26
Modified files: lib/libcrypto/evp: digest.c evp.h evp_lib.c evp_locl.h Log message: Prepare to provide EVP_MD_CTX{,_set}_pkey_ctx() This API with very strange ownership handling is used by Ruby 3.1, unfortunately. For unclear reasons, it was decided that the caller retains ownership of the pctx passed in. EVP_PKEY_CTX aren't refcounted, so a flag was added to make sure that md_ctx->pctx is not freed in EVP_MD_CTX_{cleanup,reset}(). Since EVP_MD_CTX_copy_ex() duplicates the md_ctx->pctx, the flag also needs to be unset on the duplicated EVP_MD_CTX. ok inoguchi jsing