summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPaul Yang <yang.yang@baishancloud.com>2018-09-03 23:56:41 +0800
committerPaul Yang <yang.yang@baishancloud.com>2018-09-07 18:12:26 +0800
commit00902d9414b4c6e46f78d7a6b6c8edc4d313d4b7 (patch)
tree9297617a7f6eaa8ff50c63e021c02a1953483818 /include
parent5bd0abe7a2f76d8c80f566ae615c10113884d843 (diff)
Introduce EVP_MD_CTX_set_pkey_ctx
Thus users can use this function to set customized EVP_PKEY_CTX to EVP_MD_CTX structure. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/7113)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/evp.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/openssl/evp.h b/include/openssl/evp.h
index 185cc29b88..d72c2104bc 100644
--- a/include/openssl/evp.h
+++ b/include/openssl/evp.h
@@ -181,6 +181,9 @@ int (*EVP_MD_meth_get_ctrl(const EVP_MD *md))(EVP_MD_CTX *ctx, int cmd,
*/
# define EVP_MD_CTX_FLAG_FINALISE 0x0200
+/* Don't free up ctx->pctx in EVP_MD_CTX_reset */
+# define EVP_MD_CTX_FLAG_NEGLECT_PCTX 0x0400
+
EVP_CIPHER *EVP_CIPHER_meth_new(int cipher_type, int block_size, int key_len);
EVP_CIPHER *EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher);
void EVP_CIPHER_meth_free(EVP_CIPHER *cipher);
@@ -453,6 +456,7 @@ void EVP_MD_CTX_set_update_fn(EVP_MD_CTX *ctx,
# define EVP_MD_CTX_block_size(e) EVP_MD_block_size(EVP_MD_CTX_md(e))
# define EVP_MD_CTX_type(e) EVP_MD_type(EVP_MD_CTX_md(e))
EVP_PKEY_CTX *EVP_MD_CTX_pkey_ctx(const EVP_MD_CTX *ctx);
+void EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx);
void *EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx);
int EVP_CIPHER_nid(const EVP_CIPHER *cipher);