From 9dd051ee2075fc69f1304f5e92f999bbe33635b2 Mon Sep 17 00:00:00 2001 From: tb <> Date: Sun, 24 Oct 2021 13:51:07 +0000 Subject: Prepare to provide EVP_MD_CTX_get_md_data() ok beck jsing --- src/lib/libcrypto/evp/evp.h | 5 ++++- src/lib/libcrypto/evp/evp_lib.c | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h index 06c529ef3f..4e32a794b4 100644 --- a/src/lib/libcrypto/evp/evp.h +++ b/src/lib/libcrypto/evp/evp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: evp.h,v 1.83 2021/05/10 17:00:32 tb Exp $ */ +/* $OpenBSD: evp.h,v 1.84 2021/10/24 13:51:07 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -486,6 +486,9 @@ int EVP_MD_block_size(const EVP_MD *md); unsigned long EVP_MD_flags(const EVP_MD *md); const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx); +#if defined(LIBRESSL_NEW_API) +void *EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx); +#endif #define EVP_MD_CTX_size(e) EVP_MD_size(EVP_MD_CTX_md(e)) #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)) diff --git a/src/lib/libcrypto/evp/evp_lib.c b/src/lib/libcrypto/evp/evp_lib.c index 90107739e7..83b81bd429 100644 --- a/src/lib/libcrypto/evp/evp_lib.c +++ b/src/lib/libcrypto/evp/evp_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_lib.c,v 1.17 2018/09/12 06:35:38 djm Exp $ */ +/* $OpenBSD: evp_lib.c,v 1.18 2021/10/24 13:51:07 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -353,6 +353,12 @@ EVP_MD_CTX_md(const EVP_MD_CTX *ctx) return ctx->digest; } +void * +EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx) +{ + return ctx->md_data; +} + void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags) { -- cgit v1.2.3-55-g6feb