summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp/evp.h
diff options
context:
space:
mode:
authortb <>2022-01-10 13:42:28 +0000
committertb <>2022-01-10 13:42:28 +0000
commit6a79048c6ee8a18e9fcc44f3f5a50bc543746795 (patch)
tree2bc925230c4c9e6d5030de84f085dab06f9d25b2 /src/lib/libcrypto/evp/evp.h
parentf6fc38b96a2e9ff33c2e7209ae28a9b765ebec8a (diff)
downloadopenbsd-6a79048c6ee8a18e9fcc44f3f5a50bc543746795.tar.gz
openbsd-6a79048c6ee8a18e9fcc44f3f5a50bc543746795.tar.bz2
openbsd-6a79048c6ee8a18e9fcc44f3f5a50bc543746795.zip
Prepare to provide the EVP_MD_meth_* API
This allows implementations to add their own EVP_MD_METHODs. Only the setters are provided. This is used by erlang for the otp_test_engine. ok inoguchi jsing
Diffstat (limited to 'src/lib/libcrypto/evp/evp.h')
-rw-r--r--src/lib/libcrypto/evp/evp.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h
index a3a55caf88..7fae46f610 100644
--- a/src/lib/libcrypto/evp/evp.h
+++ b/src/lib/libcrypto/evp/evp.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp.h,v 1.94 2022/01/10 12:10:26 tb Exp $ */ 1/* $OpenBSD: evp.h,v 1.95 2022/01/10 13:42:28 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -495,6 +495,26 @@ int EVP_MD_size(const EVP_MD *md);
495int EVP_MD_block_size(const EVP_MD *md); 495int EVP_MD_block_size(const EVP_MD *md);
496unsigned long EVP_MD_flags(const EVP_MD *md); 496unsigned long EVP_MD_flags(const EVP_MD *md);
497 497
498#if defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_CRYPTO_INTERNAL)
499EVP_MD *EVP_MD_meth_new(int md_type, int pkey_type);
500void EVP_MD_meth_free(EVP_MD *md);
501EVP_MD *EVP_MD_meth_dup(const EVP_MD *md);
502int EVP_MD_meth_set_input_blocksize(EVP_MD *md, int blocksize);
503int EVP_MD_meth_set_result_size(EVP_MD *md, int resultsize);
504int EVP_MD_meth_set_app_datasize(EVP_MD *md, int datasize);
505int EVP_MD_meth_set_flags(EVP_MD *md, unsigned long flags);
506int EVP_MD_meth_set_init(EVP_MD *md, int (*init)(EVP_MD_CTX *ctx));
507int EVP_MD_meth_set_update(EVP_MD *md,
508 int (*update)(EVP_MD_CTX *ctx, const void *data, size_t count));
509int EVP_MD_meth_set_final(EVP_MD *md,
510 int (*final)(EVP_MD_CTX *ctx, unsigned char *md));
511int EVP_MD_meth_set_copy(EVP_MD *md,
512 int (*copy)(EVP_MD_CTX *to, const EVP_MD_CTX *from));
513int EVP_MD_meth_set_cleanup(EVP_MD *md, int (*cleanup)(EVP_MD_CTX *ctx));
514int EVP_MD_meth_set_ctrl(EVP_MD *md,
515 int (*ctrl)(EVP_MD_CTX *ctx, int cmd, int p1, void *p2));
516#endif
517
498const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx); 518const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);
499void *EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx); 519void *EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx);
500#if defined(LIBRESSL_CRYPTO_INTERANL) || defined(LIBRESSL_NEXT_API) 520#if defined(LIBRESSL_CRYPTO_INTERANL) || defined(LIBRESSL_NEXT_API)