diff options
| author | tb <> | 2022-01-10 13:42:28 +0000 |
|---|---|---|
| committer | tb <> | 2022-01-10 13:42:28 +0000 |
| commit | 6a79048c6ee8a18e9fcc44f3f5a50bc543746795 (patch) | |
| tree | 2bc925230c4c9e6d5030de84f085dab06f9d25b2 /src/lib/libcrypto/evp/evp.h | |
| parent | f6fc38b96a2e9ff33c2e7209ae28a9b765ebec8a (diff) | |
| download | openbsd-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.h | 22 |
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); | |||
| 495 | int EVP_MD_block_size(const EVP_MD *md); | 495 | int EVP_MD_block_size(const EVP_MD *md); |
| 496 | unsigned long EVP_MD_flags(const EVP_MD *md); | 496 | unsigned long EVP_MD_flags(const EVP_MD *md); |
| 497 | 497 | ||
| 498 | #if defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_CRYPTO_INTERNAL) | ||
| 499 | EVP_MD *EVP_MD_meth_new(int md_type, int pkey_type); | ||
| 500 | void EVP_MD_meth_free(EVP_MD *md); | ||
| 501 | EVP_MD *EVP_MD_meth_dup(const EVP_MD *md); | ||
| 502 | int EVP_MD_meth_set_input_blocksize(EVP_MD *md, int blocksize); | ||
| 503 | int EVP_MD_meth_set_result_size(EVP_MD *md, int resultsize); | ||
| 504 | int EVP_MD_meth_set_app_datasize(EVP_MD *md, int datasize); | ||
| 505 | int EVP_MD_meth_set_flags(EVP_MD *md, unsigned long flags); | ||
| 506 | int EVP_MD_meth_set_init(EVP_MD *md, int (*init)(EVP_MD_CTX *ctx)); | ||
| 507 | int EVP_MD_meth_set_update(EVP_MD *md, | ||
| 508 | int (*update)(EVP_MD_CTX *ctx, const void *data, size_t count)); | ||
| 509 | int EVP_MD_meth_set_final(EVP_MD *md, | ||
| 510 | int (*final)(EVP_MD_CTX *ctx, unsigned char *md)); | ||
| 511 | int EVP_MD_meth_set_copy(EVP_MD *md, | ||
| 512 | int (*copy)(EVP_MD_CTX *to, const EVP_MD_CTX *from)); | ||
| 513 | int EVP_MD_meth_set_cleanup(EVP_MD *md, int (*cleanup)(EVP_MD_CTX *ctx)); | ||
| 514 | int EVP_MD_meth_set_ctrl(EVP_MD *md, | ||
| 515 | int (*ctrl)(EVP_MD_CTX *ctx, int cmd, int p1, void *p2)); | ||
| 516 | #endif | ||
| 517 | |||
| 498 | const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx); | 518 | const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx); |
| 499 | void *EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx); | 519 | void *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) |
